Hey! Was away from the windows machine for a while.
So, thanks to the log, which showed this I figured V2rayN is the problem. NetIP doesn’t work with it enabled. Without it works fine. Here’s the log:
2024-12-03 16:25:21.844 +03:00 [INF] Logging initialized.
2024-12-03 16:25:22.792 +03:00 [INF] NetIP is fully started and ready!
2024-12-03 16:25:28.497 +03:00 [ERR] [Public IPv4] An error occurred while making the HTTP request.
System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (127.0.0.1:10809)
---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.<ConnectAsync>g__Core|281_0(IPAddress[] addresses, Int32 port, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.<ConnectAsync>g__Core|281_0(IPAddress[] addresses, Int32 port, CancellationToken cancellationToken)
at NetIP.Services.NetworkInfoService.<>c__DisplayClass0_0.<<CreateHttpClient>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
at NetIP.Services.NetworkInfoService.GetExternalIPV4(HttpRequestResult Result)
Version 0.1.0 works fine with Vray on.
For me the sense of NetIP is to quickly check where are we now with VPN on/off/location change…
Another note… V2Ray sets system proxy and has the option to clear it instantly. However, NetIP won’t work properly even after the system proxy is cleared and the V2ray is unloaded from memory. It starts to function only after I restart it.