vpnhood / VpnHood

Undetectable Fast Portable VPN
GNU Lesser General Public License v2.1
971 stars 146 forks source link

zerotier-one support #218

Closed ryanryanorient closed 1 year ago

ryanryanorient commented 1 year ago

Multi-nic support, my computer is connected to two nics at the same time, One of the connections didn't have a network (provided by zerotier-one) IP 192.168.20.22, it has Internet, with a vpnhoodserver installed The other connection has the Internet, but it's limited, IP: 192.168.1.222 After connecting to vpnhoodserver from my computer, all the networks are unavailable

PAC support ?

trudyhood commented 1 year ago

Hi and welcome.

Do you mean that you can connect to VpnHoodServer, and nothing works? Can you send me the log of the client?

PAC support?

What is PAC?

ryanryanorient commented 1 year ago

Proxy Auto Config (PAC). The PAC file is a function that contains the JavaScript form "FindProxyForURL(url, host)". This function returns a string containing one or more access rules. The user agent applies a specific agent according to these rules or accesses it directly

It looks like a whitelist, and only addresses in the whitelist go through the proxy server

logs:

` 11:39:34.503 INF >> [WebServer] Running HTTPListener: Unosquare HTTP Listener 11:39:34.520 INF >> [WebServer] Web server prefix 'http://127.0.0.1:9090/' added. [11:39:34.9987] warn: [0] Could not find updater: E:\Users\Administrator\source\repos\VpnHood-main\VpnHood.Client.App.Win\bin\Debug\net7.0-windows\updater.exe [11:39:37.8231] info: [0] AppVersion: 2.6.328.0 [11:39:37.8262] info: [0] Time: 2022-12-29 03:39:37Z [11:39:37.8270] info: [0] OS: Microsoft Windows NT 10.0.19042.0, 64-bit [11:39:37.8274] info: [0] UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54 [11:39:37.8280] info: [0] TokenId: -84f3-ea46b8fef1f1, SupportId: 0 [11:39:37.8381] info: [0] => Client UseUdpChannel: False, MinWorkerThreads: 6, CompletionPortThreads: 1 [11:39:37.8391] info: [0] => Client Client Version: 2.6.328.0, ClientId: -80fa-9339b5472963 [11:39:37.8397] info: [0] => Client Client is Connecting [11:39:37.8464] trce: [10] => Client Connecting to Server: 192...14:443... [11:39:37.9091] trce: [10] => Client TLS Authenticating. HostName: itufo.com... [11:39:38.0964] trce: [10] => Client Sending a request... RequestCode: Hello. [11:39:38.1941] trce: [10] => Client Received a response... ErrorCode: Ok. [11:39:38.1951] info: [0] => Client Client is Connected [11:39:39.2120] info: [0] => Client Client Country is: [11:39:39.2138] warn: [0] => Client You suppressed a session of yourself! [11:39:39.2167] trce: [17] => Client Connecting to Server: 192...14:443... [11:39:39.2178] trce: [17] => Client Connecting to Server: 192...14:443... [11:39:39.2188] trce: [17] => Client Connecting to Server: 192...14:443... [11:39:39.2196] trce: [17] => Client Connecting to Server: 192...14:443... [11:39:39.2795] trce: [17] => Client TLS Authenticating. HostName: itufo.com... [11:39:39.2808] trce: [17] => Client TLS Authenticating. HostName: itufo.com... [11:39:39.2824] trce: [17] => Client TLS Authenticating. HostName: itufo.com... [11:39:39.2826] trce: [17] => Client TLS Authenticating. HostName: itufo.com... [11:39:39.4059] trce: [17] => Client Sending a request... RequestCode: TcpDatagramChannel. [11:39:39.4076] trce: [17] => Client Sending a request... RequestCode: TcpDatagramChannel. [11:39:39.4080] trce: [17] => Client Sending a request... RequestCode: TcpDatagramChannel. [11:39:39.4111] trce: [17] => Client Sending a request... RequestCode: TcpDatagramChannel. [11:39:39.4695] trce: [17] => Client Received a response... ErrorCode: Ok. [11:39:39.4710] trce: [17] => Client Received a response... ErrorCode: Ok. [11:39:39.4716] trce: [17] => Client Received a response... ErrorCode: Ok. [11:39:39.4721] trce: [17] => Client Received a response... ErrorCode: Ok. [11:39:39.4735] info: [17] => Client A TcpDatagramChannel has been added. ChannelCount: 1 [11:39:39.4741] info: [17] => Client A TcpDatagramChannel has been added. ChannelCount: 2 [11:39:39.4745] info: [17] => Client A TcpDatagramChannel has been added. ChannelCount: 3 [11:39:39.4749] info: [17] => Client A TcpDatagramChannel has been added. ChannelCount: 4 [11:39:39.4797] info: [10] => Client Hurray! Client has connected! SessionId: *2, ServerVersion: 2.6.328.0, ClientIp: 192...224 [11:39:39.4803] trce: [0] => Client Starting TcpProxyHost... [11:39:39.4810] info: [0] => Client => TcpProxyHost Starting TcpProxyHost... [11:39:39.4815] info: [0] => Client => TcpProxyHost TcpProxyHost is listening on 0.0.0.0:50636 [11:39:39.4852] info: [0] => Client => TcpProxyHost TcpProxyHost is listening on :::50637 [11:39:41.4821] info: [0] => Client PacketCapture Include Networks: 0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/8, 169.0.0.0/9, 169.128.0.0/10, 169.192.0.0/11, 169.224.0.0/12, 169.240.0.0/13, 169.248.0.0/14, 169.252.0.0/15, 169.255.0.0/16, 170.0.0.0/7, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 224.0.0.0/3, 2000::/3 [11:40:01.5072] warn: [0] => Client Could not send 1 packets via a channel! Message: Unable to write data to the transport connection: The remote host forcibly closed an existing connection。.//All Networks blocked [11:40:01.5156] info: [17] => Client A TcpDatagramChannel has been removed. ChannelCount: 3 [11:40:01.5262] info: [17] => Client A TcpDatagramChannel has been removed. ChannelCount: 2 [11:40:01.5268] warn: [0] => Client Could not send 2 packets via a channel! Message: Cannot access a disposed object. Object name: 'TcpDatagramChannel'. [11:40:01.5275] trce: [17] => Client Connecting to Server: 192...14:443... [11:40:01.5327] info: [17] => Client A TcpDatagramChannel has been removed. ChannelCount: 1 [11:40:01.5331] info: [17] => Client A TcpDatagramChannel has been removed. ChannelCount: 0 [11:40:01.5334] trce: [17] => Client Connecting to Server: 192...14:443... [11:40:01.6014] warn: [0] => Client Could not send 3 packets via a channel! Message: Unable to write data to the transport connection: The remote host forcibly closed an existing connection. //All Networks blocked [11:40:22.5904] info: [0] => Client Client is Connecting [11:40:22.6861] fail: [0] => Client Couldn't add a TcpDatagramChannel! [11:40:24.4805] trce: [17] => Client Connecting to Server: 192...14:443... [11:40:24.4819] trce: [17] => Client Connecting to Server: 192...14:443... [11:40:24.4827] trce: [17] => Client Connecting to Server: 192...14:443... [11:40:24.4832] trce: [17] => Client Connecting to Server: 192..*.14:443...

`

The unrestricted host address is provided by zerotier software, and the cause of the failure seems to be because zerotier's network is also disabled (it forwards data from the physical network card and virtualizes another network card and IP address), so the service is interrupted

trudyhood commented 1 year ago

It looks like you are running an unofficial version of VpnHood! image

Would you try our latest official version?

Anyway, it is interesting to know about the PAC file. I add it to our backlog.

ryanryanorient commented 1 year ago

yes run from the source code

trudyhood commented 1 year ago

PAC file added here. #228

The remote host forcibly closed an existing connection

Do you have any idea why the connection is blocked? Would you try to use DNSEC on your computer and let me know the result?