vpnhood / VpnHood

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

error in connection #510

Closed SalimiHabib closed 5 months ago

SalimiHabib commented 5 months ago

server is working and can be connect to it but some ip(s) got below error connection cannot be established :


Info 
| 00:31:36.9527 |  | VpnHood Client is Connecting ...

Info 
| 00:31:36.9535 |  | AppVersion: 4.3.485.0

Info 
| 00:31:36.9535 |  | Time: 2024-04-07 07:31:36Z

Info 
| 00:31:36.9535 |  | OS: Microsoft Windows NT 10.0.20348.0, 64-bit

Info 
| 00:31:36.9535 |  | UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0

Info 
| 00:31:37.3014 |  | Country: Iran 

Info 
| 00:31:37.3014 |  | TokenId: **-b461-a2dec457a20c, SupportId: <null>

Info 
| 00:31:37.3015 |  | UserSettings: {
  "Logging": {
    "LogToConsole": true,
    "LogToFile": false,
    "LogVerbose": false,
    "LogAnonymous": true
  },
  "CultureCode": null,
  "DefaultClientProfileId": "fe2467f7-ae6a-407f-914f-dea11e912744",
  "MaxReconnectCount": 2147483647,
  "MaxDatagramChannelCount": 4,
  "TunnelClientCountry": true,
  "IpGroupFilters": null,
  "IpGroupFiltersMode": "All",
  "CustomIpRanges": null,
  "AppFilters": null,
  "AppFiltersMode": "All",
  "UseUdpChannel": true,
  "DropUdpPackets": false,
  "ExcludeLocalNetwork": true,
  "PacketCaptureIncludeIpRanges": [
    "0.0.0.0-255.255.255.255",
    "::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
  ],
  "PacketCaptureExcludeIpRanges": [],
  "AllowAnonymousTracker": true,
  "DnsServers": null
}

Trac 
| 00:31:37.3025 |  | Checking the Internet connection...

Info 
| 00:31:37.3089 |  | PingTest: Started, RemoteAddress: 8.8.8.8, Timeout: 10000...

Info 
| 00:31:37.3099 |  | PingTest: Started, RemoteAddress: 1.1.1.1, Timeout: 10000...

Info 
| 00:31:37.3103 |  | UdpTest: Started, DnsName: www.google.com, NsServer: 8.8.8.8:53, Timeout: 10000...

Info 
| 00:31:37.3108 |  | UdpTest: Started, DnsName: www.google.com, NsServer: 1.1.1.1:53, Timeout: 10000...

Info 
| 00:31:37.3111 |  | HttpTest: Started, Url: https://www.google.com/, Timeout: 10000...

Info 
| 00:31:37.3114 |  | HttpTest: Started, Url: https://www.quad9.net/, Timeout: 10000...

Info 
| 00:31:37.3117 |  | HttpTest: Started, Url: https://www.microsoft.com/, Timeout: 10000...

Info 
| 00:31:37.3151 |  | UdpTest: Succeeded, DnsName: www.google.com, NsServer: 8.8.8.8:53.

Info 
| 00:31:37.3164 |  | UdpTest: Succeeded, DnsName: www.google.com, NsServer: 1.1.1.1:53.

Info 
| 00:31:37.3895 |  | PingTest: Succeeded, RemoteAddress: 1.1.1.1.

Info 
| 00:31:37.4132 |  | PingTest: Succeeded, RemoteAddress: 8.8.8.8.

Info 
| 00:31:38.3106 |  | HttpTest: Succeeded, Url: https://www.google.com/.

Trac 
| 00:31:38.3111 |  | Checking the VpnServer ping...

Info 
| 00:31:38.3111 |  | PingTest: Started, RemoteAddress: 185.*.*.18, Timeout: 10000...

Info 
| 00:31:38.7404 |  | HttpTest: Succeeded, Url: https://www.quad9.net/.

Warn 
| 00:31:43.7001 |  | HttpTest: Failed!, Url: https://www.microsoft.com/. Message: The request was canceled due to the configured HttpClient.Timeout of 10 seconds elapsing.

Warn 
| 00:31:47.3130 |  | HttpTest: Failed!, Url: https://www.microsoft.com/. Message: The request was canceled due to the configured HttpClient.Timeout of 10 seconds elapsing.

Warn 
| 00:31:47.8133 |  | PingTest: Failed!, RemoteAddress: 185.*.*.18. Message: Status: TimedOut
Exception: System.Exception: Status: TimedOut
   at VpnHood.Client.Diagnosing.DiagnoseUtil.CheckPing(IPAddress ipAddress, Int32 timeout, Boolean anonymize) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\Diagnosing\DiagnoseUtil.cs:line 118

Warn 
| 00:31:47.8134 |  | Could not ping server! EndPoint: 185.*.*.18, Error: Status: TimedOut

Info => Client
| 00:31:47.8185 |  | UseUdpChannel: True, DropUdpPackets: False, ExcludeLocalNetwork: True, MinWorkerThreads: 4, CompletionPortThreads: 1

Info => Client
| 00:31:47.8185 |  | ClientVersion: 4.3.485.0, ClientProtocolVersion: 4, ClientId: **-ae25-426edf49018e

Info => Client
| 00:31:47.8185 |  | Client state is changed. NewState: Connecting

Trac => Client
| 00:31:47.8187 | Session | Sending a request. RequestCode: Hello, RequestId: b8794a1e-ae8c-416e-8377-cc4d3ce3f6f7:client

Trac => Client
| 00:31:47.8192 | Tcp | Connecting to Server... EndPoint: 185.*.*.18:443

Trac => Client
| 00:31:47.9013 | Tcp | TLS Authenticating... HostName: wi***.net

Erro 
| 00:32:07.1079 | Session | Disposing...
Exception: VpnHood.Client.Exceptions.ConnectorEstablishException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at VpnHood.Client.ConnectorServices.ConnectorServiceBase.GetTlsConnectionToServer(String streamId, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorServiceBase.cs:line 116
   --- End of inner exception stack trace ---
   at VpnHood.Client.ConnectorServices.ConnectorServiceBase.GetTlsConnectionToServer(String streamId, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorServiceBase.cs:line 132
   at VpnHood.Client.ConnectorServices.ConnectorService.SendRequest[T](Byte[] request, String requestId, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorService.cs:line 78
   at VpnHood.Client.ConnectorServices.ConnectorService.SendRequest[T](ClientRequest request, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorService.cs:line 33
   at VpnHood.Client.ConnectorServices.ConnectorService.SendRequest[T](ClientRequest request, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorService.cs:line 40
   at VpnHood.Client.VpnHoodClient.SendRequest[T](ClientRequest request, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\VpnHoodClient.cs:line 787
   at VpnHood.Client.VpnHoodClient.ConnectInternal(CancellationToken cancellationToken, Boolean redirecting) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\VpnHoodClient.cs:line 617
   at VpnHood.Client.VpnHoodClient.Connect(CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\VpnHoodClient.cs:line 242

Trac 
| 00:32:07.1087 |  | Shutting down...

Info 
| 00:32:07.1088 |  | Client state is changed. NewState: Disconnecting

Trac 
| 00:32:07.1152 |  | Disposing ClientHost...

Trac 
| 00:32:07.1152 |  | Disposing Tunnel...

Trac 
| 00:32:07.1153 |  | Disposing ProxyManager...

Trac 
| 00:32:07.1153 |  | Disposing Nat...

Trac 
| 00:32:07.1153 |  | Disposing ConnectorService...

Info 
| 00:32:07.1153 |  | Client state is changed. NewState: Disposed

Info 
| 00:32:07.1211 |  | Bye Bye!

Erro 
| 00:32:07.1216 |  | Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
SalimiHabib commented 5 months ago

this is another report from windows client same server


Info 
| 00:31:36.9527 |  | VpnHood Client is Connecting ...

Info 
| 00:31:36.9535 |  | AppVersion: 4.3.485.0

Info 
| 00:31:36.9535 |  | Time: 2024-04-07 07:31:36Z

Info 
| 00:31:36.9535 |  | OS: Microsoft Windows NT 10.0.20348.0, 64-bit

Info 
| 00:31:36.9535 |  | UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0

Info 
| 00:31:37.3014 |  | Country: Iran 

Info 
| 00:31:37.3014 |  | TokenId: **-b461-a2dec457a20c, SupportId: <null>

Info 
| 00:31:37.3015 |  | UserSettings: {
  "Logging": {
    "LogToConsole": true,
    "LogToFile": false,
    "LogVerbose": false,
    "LogAnonymous": true
  },
  "CultureCode": null,
  "DefaultClientProfileId": "fe2467f7-ae6a-407f-914f-dea11e912744",
  "MaxReconnectCount": 2147483647,
  "MaxDatagramChannelCount": 4,
  "TunnelClientCountry": true,
  "IpGroupFilters": null,
  "IpGroupFiltersMode": "All",
  "CustomIpRanges": null,
  "AppFilters": null,
  "AppFiltersMode": "All",
  "UseUdpChannel": true,
  "DropUdpPackets": false,
  "ExcludeLocalNetwork": true,
  "PacketCaptureIncludeIpRanges": [
    "0.0.0.0-255.255.255.255",
    "::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"
  ],
  "PacketCaptureExcludeIpRanges": [],
  "AllowAnonymousTracker": true,
  "DnsServers": null
}

Trac 
| 00:31:37.3025 |  | Checking the Internet connection...

Info 
| 00:31:37.3089 |  | PingTest: Started, RemoteAddress: 8.8.8.8, Timeout: 10000...

Info 
| 00:31:37.3099 |  | PingTest: Started, RemoteAddress: 1.1.1.1, Timeout: 10000...

Info 
| 00:31:37.3103 |  | UdpTest: Started, DnsName: www.google.com, NsServer: 8.8.8.8:53, Timeout: 10000...

Info 
| 00:31:37.3108 |  | UdpTest: Started, DnsName: www.google.com, NsServer: 1.1.1.1:53, Timeout: 10000...

Info 
| 00:31:37.3111 |  | HttpTest: Started, Url: https://www.google.com/, Timeout: 10000...

Info 
| 00:31:37.3114 |  | HttpTest: Started, Url: https://www.quad9.net/, Timeout: 10000...

Info 
| 00:31:37.3117 |  | HttpTest: Started, Url: https://www.microsoft.com/, Timeout: 10000...

Info 
| 00:31:37.3151 |  | UdpTest: Succeeded, DnsName: www.google.com, NsServer: 8.8.8.8:53.

Info 
| 00:31:37.3164 |  | UdpTest: Succeeded, DnsName: www.google.com, NsServer: 1.1.1.1:53.

Info 
| 00:31:37.3895 |  | PingTest: Succeeded, RemoteAddress: 1.1.1.1.

Info 
| 00:31:37.4132 |  | PingTest: Succeeded, RemoteAddress: 8.8.8.8.

Info 
| 00:31:38.3106 |  | HttpTest: Succeeded, Url: https://www.google.com/.

Trac 
| 00:31:38.3111 |  | Checking the VpnServer ping...

Info 
| 00:31:38.3111 |  | PingTest: Started, RemoteAddress: 185.*.*.18, Timeout: 10000...

Info 
| 00:31:38.7404 |  | HttpTest: Succeeded, Url: https://www.quad9.net/.

Warn 
| 00:31:43.7001 |  | HttpTest: Failed!, Url: https://www.microsoft.com/. Message: The request was canceled due to the configured HttpClient.Timeout of 10 seconds elapsing.

Warn 
| 00:31:47.3130 |  | HttpTest: Failed!, Url: https://www.microsoft.com/. Message: The request was canceled due to the configured HttpClient.Timeout of 10 seconds elapsing.

Warn 
| 00:31:47.8133 |  | PingTest: Failed!, RemoteAddress: 185.*.*.18. Message: Status: TimedOut
Exception: System.Exception: Status: TimedOut
   at VpnHood.Client.Diagnosing.DiagnoseUtil.CheckPing(IPAddress ipAddress, Int32 timeout, Boolean anonymize) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\Diagnosing\DiagnoseUtil.cs:line 118

Warn 
| 00:31:47.8134 |  | Could not ping server! EndPoint: 185.*.*.18, Error: Status: TimedOut

Info => Client
| 00:31:47.8185 |  | UseUdpChannel: True, DropUdpPackets: False, ExcludeLocalNetwork: True, MinWorkerThreads: 4, CompletionPortThreads: 1

Info => Client
| 00:31:47.8185 |  | ClientVersion: 4.3.485.0, ClientProtocolVersion: 4, ClientId: **-ae25-426edf49018e

Info => Client
| 00:31:47.8185 |  | Client state is changed. NewState: Connecting

Trac => Client
| 00:31:47.8187 | Session | Sending a request. RequestCode: Hello, RequestId: b8794a1e-ae8c-416e-8377-cc4d3ce3f6f7:client

Trac => Client
| 00:31:47.8192 | Tcp | Connecting to Server... EndPoint: 185.*.*.18:443

Trac => Client
| 00:31:47.9013 | Tcp | TLS Authenticating... HostName: wi***.net

Erro 
| 00:32:07.1079 | Session | Disposing...
Exception: VpnHood.Client.Exceptions.ConnectorEstablishException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at System.Net.Security.SslStream.ReceiveHandshakeFrameAsync[TIOAdapter](CancellationToken cancellationToken)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at VpnHood.Client.ConnectorServices.ConnectorServiceBase.GetTlsConnectionToServer(String streamId, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorServiceBase.cs:line 116
   --- End of inner exception stack trace ---
   at VpnHood.Client.ConnectorServices.ConnectorServiceBase.GetTlsConnectionToServer(String streamId, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorServiceBase.cs:line 132
   at VpnHood.Client.ConnectorServices.ConnectorService.SendRequest[T](Byte[] request, String requestId, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorService.cs:line 78
   at VpnHood.Client.ConnectorServices.ConnectorService.SendRequest[T](ClientRequest request, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorService.cs:line 33
   at VpnHood.Client.ConnectorServices.ConnectorService.SendRequest[T](ClientRequest request, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\ConnectorServices\ConnectorService.cs:line 40
   at VpnHood.Client.VpnHoodClient.SendRequest[T](ClientRequest request, CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\VpnHoodClient.cs:line 787
   at VpnHood.Client.VpnHoodClient.ConnectInternal(CancellationToken cancellationToken, Boolean redirecting) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\VpnHoodClient.cs:line 617
   at VpnHood.Client.VpnHoodClient.Connect(CancellationToken cancellationToken) in C:\Users\Developer\source\repos\Vh\VpnHood\VpnHood.Client\VpnHoodClient.cs:line 242

Trac 
| 00:32:07.1087 |  | Shutting down...

Info 
| 00:32:07.1088 |  | Client state is changed. NewState: Disconnecting

Trac 
| 00:32:07.1152 |  | Disposing ClientHost...

Trac 
| 00:32:07.1152 |  | Disposing Tunnel...

Trac 
| 00:32:07.1153 |  | Disposing ProxyManager...

Trac 
| 00:32:07.1153 |  | Disposing Nat...

Trac 
| 00:32:07.1153 |  | Disposing ConnectorService...

Info 
| 00:32:07.1153 |  | Client state is changed. NewState: Disposed

Info 
| 00:32:07.1211 |  | Bye Bye!

Erro 
| 00:32:07.1216 |  | Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
trudyhood commented 5 months ago

An existing connection was forcibly closed by the remote host

It seems that some of your PublicEndPoints are not correctly configured to point to a listener IP or port on your server. This cause that error, as there would be no listener available and your server would close by the remote host.

To prevent this, you should ensure that all PublicEndPoints on your server are correctly configured and pointed to your server, or if you use a valid domain name, make sure all DNS are configured correctly. For example, make sure that port 443 at IP address 185...18 is open on your server, and that VpnHood Server is listening to it.

SalimiHabib commented 5 months ago

i send error to you intentionally this happened last day and with no change to setup that worked for near 2 week , your suggestion about ip connectivity is done already . we think may be this is the way that censorship can block vpnhood this is from censored country :


Pinging 185.*.*.18 with 32 bytes of data:
Reply from 185.*.*.18: bytes=32 time=47ms TTL=50
Reply from 185.*.*.18: bytes=32 time=44ms TTL=50
Request timed out.
Request timed out.
Request timed out.

and this is from outside of country


Reply from 185.*.*.18: bytes=32 time=19ms TTL=52
Reply from 185.*.*.18: bytes=32 time=21ms TTL=52
Reply from 185.*.*.18: bytes=32 time=19ms TTL=52
Reply from 185.*.*.18: bytes=32 time=19ms TTL=52
Reply from 185.*.*.18: bytes=32 time=18ms TTL=52
Reply from 185.*.*.18: bytes=32 time=18ms TTL=52
Reply from 185.*.*.18: bytes=32 time=18ms TTL=52
Reply from 185.*.*.18: bytes=32 time=19ms TTL=52
Reply from 185.*.*.18: bytes=32 time=19ms TTL=52
Reply from 185.*.*.18: bytes=32 time=19ms TTL=52
Reply from 185.*.*.18: bytes=32 time=21ms TTL=52
Reply from 185.*.*.18: bytes=32 time=19ms TTL=52
Reply from 185.*.*.18: bytes=32 time=19ms TTL=52

and it seems they manipulate https packet when they find IP address (i don't know how and which part of it ) but may be this error can help to mitigate the censorship problem

trudyhood commented 5 months ago

There are many other ways to find a VPN Server's IP. We focused on making it exactly like a regular website, and VpnHood has zero fingerprints.

If you have any ideas that you think may help, let us know so we can work on them.