macronut / phantomsocks

A cross-platform proxy client/server for Linux/Windows/macOS
GNU Lesser General Public License v3.0
453 stars 18 forks source link

Take over all domains #33

Closed Illustar0 closed 2 years ago

Illustar0 commented 2 years ago

Is there a way to make all domain names handled by phantomsocks? It is too troublesome to add one by one to the conf.

macronut commented 2 years ago

phantomsocks/phantomtcp/phantom.go +446 The server set for the first time will be the default value, and other parameters set before it will also be the default.

Illustar0 commented 2 years ago

I think you may not understand what I mean, currently if you want phantomsocks to process packets for a domain you have to add the domain to the conf file, for example, in this example phantomsocks will only handle Pixiv related domains

server=udp://192.168.1.1:53
method=w-md5,s-seg,https
#Pixiv
pixiv.net
.pixiv.net
i.pximg.net

but it is very troublesome to add domains one by one, I want to know if there is a way for phantomsocks to process packets for all domains (even if that domain is not in the conf file)

macronut commented 2 years ago

DefaultServer is what is used for all domains that are not in the config.

If you set it like this at the beginning of the config: method=w-md5,https server=udp://8.8.8.8:53 #DefaultServer is set in this line

Illustar0 commented 2 years ago

It worked,Thanks!