用途
使openvpn只代理指定的ip,而不是默认的全局代理
openvpn配置文件
关闭默认route:route-nopull
指定ip段进行代理:route 58.199.160.0 255.255.248.0 vpn_gateway
SHU-Student 修改后的配置文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
| client dev tun proto tcp
route-nopull route 58.199.160.0 255.255.248.0 vpn_gateway route 202.120.112.0 255.255.248.0 vpn_gateway
<connection> remote openvpn3.shu.edu.cn 443 </connection>
comp-lzo resolv-retry infinite nobind persist-key persist-tun setenv CLIENT_CERT 0 auth-user-pass remote-cert-tls server verb 3
sndbuf 0 rcvbuf 0 mssfix 0 cipher none
<ca> -----BEGIN CERTIFICATE----- MIIEoTCCA4mgAwIBAgIJAMW52H83M9JAMA0GCSqGSIb3DQEBCwUAMIGRMQswCQYD VQQGEwJDTjELMAkGA1UECBMCU0gxETAPBgNVBAcTCFNoYW5nSGFpMQwwCgYDVQQK EwNTSFUxDDAKBgNVBAsTA1NIVTEPMA0GA1UEAxMGU0hVIENBMRAwDgYDVQQpEwdF YXN5UlNBMSMwIQYJKoZIhvcNAQkBFhRyb2RkeTE5ODZAc2h1LmVkdS5jbjAeFw0x NzA2MjEwOTQwMjlaFw0yNzA2MTkwOTQwMjlaMIGRMQswCQYDVQQGEwJDTjELMAkG A1UECBMCU0gxETAPBgNVBAcTCFNoYW5nSGFpMQwwCgYDVQQKEwNTSFUxDDAKBgNV BAsTA1NIVTEPMA0GA1UEAxMGU0hVIENBMRAwDgYDVQQpEwdFYXN5UlNBMSMwIQYJ KoZIhvcNAQkBFhRyb2RkeTE5ODZAc2h1LmVkdS5jbjCCASIwDQYJKoZIhvcNAQEB BQADggEPADCCAQoCggEBAJ17qOLBJgX7DKsBxVhqpfYkZcPwy8DggDiwRHNLLP3h aEWRcS5NViqGthWh4mWvVkD9RypYlUywbYewoSkuLyllsFuw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