mirror of
https://github.com/netchx/netch.git
synced 2026-04-15 21:03:23 +08:00
feat: support socks5 authentication
This commit is contained in:
@@ -10,6 +10,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Netch.Models;
|
||||
using Netch.Servers.Socks5;
|
||||
using Netch.Utils;
|
||||
|
||||
namespace Netch.Controllers
|
||||
@@ -87,7 +88,7 @@ namespace Netch.Controllers
|
||||
}
|
||||
|
||||
var argument = new StringBuilder();
|
||||
if (s.IsSocks5())
|
||||
if (s is Socks5 socks5 && !socks5.Auth())
|
||||
argument.Append($"-proxyServer {_serverAddresses}:{s.Port} ");
|
||||
else
|
||||
argument.Append($"-proxyServer 127.0.0.1:{Global.Settings.Socks5LocalPort} ");
|
||||
|
||||
Reference in New Issue
Block a user