OpenVPN / openvpn3

OpenVPN 3 is a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch.
https://openvpn.net
Other
1k stars 398 forks source link

Reconnect touting table does not work #67

Closed 285979593 closed 5 years ago

285979593 commented 5 years ago

After reconnecting, the server can see the list of sessions, but the client routing table does not work. Disable the network and then turn it on to work。

285979593 commented 5 years ago

SCNetworkReachability SystemConfiguration tunnel SCNetworkReachabilityGetFlagsFromPath, flags = 0x00040003, nw_path_status_satisfied, VPN SCNetworkReachability SystemConfiguration tunnel __SCNetworkReachabilityGetFlagsFromPath, flags = 0x00040003, nw_path_status_satisfied, VPN libnetwork.dylib tunnel nw_path_copy_interface_with_generation Cache miss for interface for index 8 (generation 2000) libnetwork.dylib tunnel nw_path_copy_dictionary_for_agent_with_generation Agent for has new generation (8488 != 8506) SCNetworkReachability SystemConfiguration tunnel SCNetworkReachabilityGetFlagsFromPath, flags = 0x00040003, nw_path_status_satisfied, VPN SCNetworkReachability SystemConfiguration tunnel SCNetworkReachabilityGetFlagsFromPath, flags = 0x00000003, nw_path_status_satisfied, VPN SCNetworkReachability SystemConfiguration tunnel __SCNetworkReachabilityGetFlagsFromPath, flags = 0x00000003, nw_path_status_satisfied, VPN SCNetworkReachability SystemConfiguration tunnel [0x115d1a400] exec SCNetworkReachability callout w/flags = 0x00000003 SCNetworkReachability SystemConfiguration tunnel SCNetworkReachabilityGetFlagsFromPath, flags = 0x00000003, nw_path_status_satisfied, VPN tunnel tunnel 网络发生变化 tunnel tunnel 事件消息: Client terminated, reconnecting in 1... tunnel tunnel networkSettings: (null) tunnel tunnel networkSettings count: 0 User Defaults CoreFoundation tunnel setting new value for key in CFPrefsPlistSource<0x115e2c930> (Domain: group.com.jixun.speed, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) Large NetworkExtension tunnel [Extension com.jixun.mobile.tunnel]: provider set tunnel configuration to (null) tunnel tunnel 重新连接中 NetworkExtension tunnel <PacketTunnelProvider: 0x115e25f30>: setting reasserting 1 NetworkExtension tunnel [Extension com.jixun.mobile.tunnel]: reasserting set to 1 tunnel tunnel 解析 getaddrinfo libsystem_info.dylib tunnel nat64_v4_synthesize(8, 118.25.238.120, ...) returned 0 tunnel tunnel 事件消息: Contacting 118.25.238.120:53 via UDP tunnel tunnel 等待 tunnel tunnel 事件消息: Connecting to [118.25.238.120]:53 (118.25.238.120) via UDPv4 tunnel tunnel 正在连接 tunnel tunnel 事件消息: Tunnel Options:V4,dev-type tun,link-mtu 1602,tun-mtu 1500,proto UDPv4,comp-lzo,cipher AES-256-CBC,auth SHA512,keysize 256,key-method 2,tls-client tunnel tunnel 事件消息: Creds: Username/Password tunnel tunnel 事件消息: Peer Info: IV_VER=3.2 (qa:d87f5bbc04) IV_PLAT=ios IV_NCP=2 IV_TCPNL=1 IV_PROTO=2 IV_LZO_STUB=1 IV_COMP_STUB=1 IV_COMP_STUBv2=1 tunnel tunnel 事件消息: VERIFY OK : depth=1 cert. version : 3 serial number : 9F:D6:25:AC:AD:CF:3F:02 issuer name : CN=Easy-RSA CA subject name : CN=Easy-RSA CA issued on : 2019-02-11 09:09:08 expires on : 2029-02-08 09:09:08 signed using : RSA with SHA-256 RSA key size : 2048 bits basic constraints : CA=true key usage : Key Cert Sign, CRL Sign tunnel tunnel 事件消息: VERIFY OK : depth=0 cert. version : 3 serial number : 8D:15:5C:D6:FB:B4:D1:D0:AD:3E:CC:5E:5F:C4:69:4F issuer name : CN=Easy-RSA CA subject name : CN=server issued on : 2019-02-11 09:09:41 expires on : 2022-01-26 09:09:41 signed using : RSA with SHA-256 RSA key size : 2048 bits basic constraints : CA=false subject alt name : server cert. type : SSL Server key usage : Digital Signature, Key Encipherment ext key usage : TLS Web Server Authentication tunnel tunnel 事件消息: SSL Handshake: TLSv1.2/TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384 tunnel tunnel 事件消息: Session is ACTIVE tunnel tunnel 获取配制 tunnel tunnel 事件消息: Sending PUSH_REQUEST to server... tunnel tunnel 事件消息: Ignored due to route-nopull: [route] [172.16.1.1] tunnel tunnel 事件消息: OPTIONS: 0 [route] [104.27.69.0] [255.255.255.0] [vpn_gateway] 1 [route] [117.23.61.0] [255.255.255.0] [vpn_gateway] 2 [topology] [net30] 3 [ping] [2] 4 [ping-restart] [10] 5 [ifconfig] [172.16.1.6] [172.16.1.5] 6 [peer-id] [0] 7 [cipher] [AES-256-GCM] 8 [route-metric] [1] tunnel tunnel 事件消息: PROTOCOL OPTIONS: cipher: AES-256-GCM digest: SHA512 compress: LZO_STUB peer ID: 0 tunnel tunnel networkSettings: (null) tunnel tunnel networkSettings count: 0 User Defaults CoreFoundation tunnel CFPrefsPlistSource<0x115e2c930> (Domain: group.com.jixun.speed, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) skipping setting already-present value for key NetworkSettings Large NetworkExtension tunnel [Extension com.jixun.mobile.tunnel]: provider set tunnel configuration to (null) tunnel tunnel 分配IP tunnel tunnel networkSettings: { tunnelRemoteAddress = 118.25.238.120 IPv4Settings = { configMethod = PPP addresses = ( 172.16.1.6, ) subnetMasks = ( 255.255.255.252, ) includedRoutes = ( { destinationAddress = 104.27.69.0 destinationSubnetMask = 255.255.255.0 gatewayAddress = 172.16.1.5 }, { destinationAddress = 117.23.61.0 destinationSubnetMask = 255.255.255.0 gatewayAddress = 172.16.1.5 }, ) excludedRoutes = ( ) overridePrimary = NO } MTU = 1500 } tunnel tunnel networkSettings count: 2 User Defaults CoreFoundation tunnel setting new value for key in CFPrefsPlistSource<0x115e2c930> (Domain: group.com.jixun.speed, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No) Large NetworkExtension tunnel [Extension com.jixun.mobile.tunnel]: provider set tunnel configuration to { tunnelRemoteAddress = 118.25.238.120 IPv4Settings = { configMethod = PPP addresses = ( 172.16.1.6, ) subnetMasks = ( 255.255.255.252, ) includedRoutes = ( { destinationAddress = 104.27.69.0 destinationSubnetMask = 255.255.255.0 gatewayAddress = 172.16.1.5 }, { destinationAddress = 117.23.61.0 destinationSubnetMask = 255.255.255.0 gatewayAddress = 172.16.1.5 }, ) excludedRoutes = ( ) overridePrimary = NO } MTU = 1500 } SCNetworkReachability SystemConfiguration tunnel __SCNetworkReachabilityGetFlagsFromPath, flags = 0x00000003, nw_path_status_satisfied, VPN SCNetworkReachability SystemConfiguration tunnel __SCNetworkReachabilityGetFlagsFromPath, flags = 0x00000003, nw_path_status_satisfied, VPN tunnel tunnel 事件消息: Connected via tun tunnel tunnel 事件消息: LZO-ASYM init swap=0 asym=1 tunnel tunnel 事件消息: Comp-stub init swap=0 NetworkExtension tunnel <PacketTunnelProvider: 0x115e25f30>: setting reasserting 0 NetworkExtension tunnel [Extension com.jixun.mobile.tunnel]: reasserting set to 0 NetworkExtension tunnel [Extension com.jixun.mobile.tunnel]: Started with error (null) tunnel tunnel { "serverIP" : "118.25.238.120", "serverProto" : "UDPv4", "vpnIPv6" : null, "clientIP" : null, "serverPort" : "53", "vpnIPv4" : "172.16.1.6", "serverHost" : "118.25.238.120", "gatewayIPv4" : "172.16.1.5", "tunName" : "tun", "gatewayIPv6" : null, "user" : "xxxxxxx" }

285979593 commented 5 years ago

Issue resolved