feat: server SOCKS5 outbound domain passthrough

This commit is contained in:
Toby
2022-04-14 00:11:44 -07:00
parent 30619b393e
commit fba6cf7a1c
9 changed files with 178 additions and 112 deletions

View File

@@ -166,7 +166,10 @@ func server(config *serverConfig) {
// ACL
var aclEngine *acl.Engine
if len(config.ACL) > 0 {
aclEngine, err = acl.LoadFromFile(config.ACL, transport.DefaultServerTransport.ResolveIPAddr,
aclEngine, err = acl.LoadFromFile(config.ACL, func(addr string) (*net.IPAddr, error) {
ipAddr, _, err := transport.DefaultServerTransport.ResolveIPAddr(addr)
return ipAddr, err
},
func() (*geoip2.Reader, error) {
if len(config.MMDB) > 0 {
return loadMMDBReader(config.MMDB)