mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
Fix ServerController return socks5 hostname
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Netch.Controllers;
|
||||
using Netch.Interfaces;
|
||||
using Netch.Models;
|
||||
@@ -39,7 +40,7 @@ namespace Netch.Servers.Shadowsocks
|
||||
};
|
||||
|
||||
StartGuard(command.ToString());
|
||||
return new Socks5(this.LocalAddress(), this.Socks5LocalPort());
|
||||
return new Socks5(IPAddress.Loopback.ToString(), this.Socks5LocalPort());
|
||||
}
|
||||
|
||||
[Verb]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Netch.Controllers;
|
||||
using Netch.Interfaces;
|
||||
using Netch.Models;
|
||||
@@ -42,7 +43,7 @@ namespace Netch.Servers.ShadowsocksR
|
||||
};
|
||||
|
||||
StartGuard(command.ToString());
|
||||
return new Socks5(this.LocalAddress(), this.Socks5LocalPort());
|
||||
return new Socks5(IPAddress.Loopback.ToString(), this.Socks5LocalPort());
|
||||
}
|
||||
|
||||
[Verb]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text.Json;
|
||||
using Netch.Controllers;
|
||||
using Netch.Interfaces;
|
||||
@@ -48,7 +49,7 @@ namespace Netch.Servers
|
||||
File.WriteAllBytes(Constants.TempConfig, JsonSerializer.SerializeToUtf8Bytes(trojanConfig, Global.NewDefaultJsonSerializerOptions));
|
||||
|
||||
StartGuard("-c ..\\data\\last.json");
|
||||
return new Socks5(this.LocalAddress(), this.Socks5LocalPort());
|
||||
return new Socks5(IPAddress.Loopback.ToString(), this.Socks5LocalPort());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Netch.Controllers;
|
||||
using Netch.Interfaces;
|
||||
using Netch.Models;
|
||||
@@ -29,7 +30,7 @@ namespace Netch.Servers
|
||||
{
|
||||
File.WriteAllText(Constants.TempConfig, V2rayConfigUtils.GenerateClientConfig(s));
|
||||
StartGuard("-config ..\\data\\last.json");
|
||||
return new Socks5(this.LocalAddress(), this.Socks5LocalPort());
|
||||
return new Socks5(IPAddress.Loopback.ToString(), this.Socks5LocalPort());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user