mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-19 19:55:00 +03:00
WebProxy uses socks5 instead of http
This commit is contained in:
@@ -280,13 +280,13 @@ namespace ServiceLib.Services
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var httpPort = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks);
|
||||
if (await SocketCheck(Global.Loopback, httpPort) == false)
|
||||
var port = AppHandler.Instance.GetLocalPort(EInboundProtocol.socks);
|
||||
if (await SocketCheck(Global.Loopback, port) == false)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new WebProxy(Global.Loopback, httpPort);
|
||||
return new WebProxy($"socks5://{Global.Loopback}:{port}");
|
||||
}
|
||||
|
||||
private async Task<bool> SocketCheck(string ip, int port)
|
||||
|
||||
Reference in New Issue
Block a user