Skip to content

Commit 8ae342b

Browse files
committed
fix all default listen ip to 127.0.0.1
1 parent d26336b commit 8ae342b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/s5/cmd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func init() {
2424
Cmd.Flags().StringP("config", "c", "", "config file (default is $HOME/.config/toh/socks5.yml)")
2525
Cmd.Flags().StringP("listen", "l", "", "socks5+http listen address (specify this to override from config)")
2626
Cmd.Flags().String("dns", "", "local dns upstream (leave blank to disable local dns)")
27-
Cmd.Flags().String("dns-listen", "localhost:2053", "local dns listen address")
27+
Cmd.Flags().String("dns-listen", "127.0.0.1:2053", "local dns listen address")
2828
Cmd.Flags().String("dns-evict", "2h", "local dns cache evict duration")
2929
Cmd.Flags().String("dns-fake", "", "local fake dns (leave blank to disable fake dns)")
3030
}
@@ -129,7 +129,7 @@ func processOptions(cmd *cobra.Command) (opts server.Options, err error) {
129129
func defaultOptions() *server.Config {
130130
return &server.Config{
131131
Geoip2: "country.mmdb",
132-
Listen: "localhost:2080",
132+
Listen: "127.0.0.1:2080",
133133
Servers: []server.TohServer{{
134134
Name: "us1",
135135
Addr: "https://fill-in-your-server-here.toh.sh/ws",

cmd/serve/cmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func init() {
1818
Cmd.Flags().String("acl", "acl.json", "file containing access control rules")
1919
Cmd.Flags().String("admin", "", "admin key (leave blank to disable admin api)")
2020
Cmd.Flags().String("copy-buf", "16Ki", "buffer size for copying network data")
21-
Cmd.Flags().StringP("listen", "l", "localhost:9986", "http server listen address")
21+
Cmd.Flags().StringP("listen", "l", "127.0.0.1:9986", "http server listen address")
2222
}
2323

2424
func startAction(cmd *cobra.Command, args []string) error {

0 commit comments

Comments
 (0)