Skip to content

Commit

Permalink
bind to 127.0.0.1 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Jan 31, 2015
1 parent 601055e commit 116db6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/local.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ int main(int argc, char **argv)
}

if (local_addr == NULL) {
local_addr = "0.0.0.0";
local_addr = "127.0.0.1";
}

if (pid_flags) {
Expand Down Expand Up @@ -1162,7 +1162,7 @@ int start_ss_local_server(profile_t profile)
}

if (local_addr == NULL) {
local_addr = "0.0.0.0";
local_addr = "127.0.0.1";
}

#ifdef __MINGW32__
Expand Down
2 changes: 1 addition & 1 deletion src/redir.c
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ int main(int argc, char **argv)
}

if (local_addr == NULL) {
local_addr = "0.0.0.0";
local_addr = "127.0.0.1";
}

if (pid_flags) {
Expand Down
2 changes: 1 addition & 1 deletion src/tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ int main(int argc, char **argv)
}

if (local_addr == NULL) {
local_addr = "0.0.0.0";
local_addr = "127.0.0.1";
}

if (pid_flags) {
Expand Down

5 comments on commit 116db6c

@aa65535
Copy link

@aa65535 aa65535 commented on 116db6c Feb 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认情况下,这会导致无法在 OpenWrt 上正常工作。

@madeye
Copy link
Author

@madeye madeye commented on 116db6c Feb 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要加上 -b local_addr

@aa65535
Copy link

@aa65535 aa65535 commented on 116db6c Feb 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为默认的配置文件 local 都是留空的。

@madeye
Copy link
Author

@madeye madeye commented on 116db6c Feb 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那么在 init script 里面改吧?

@aa65535
Copy link

@aa65535 aa65535 commented on 116db6c Feb 1, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,需要在 init script 里添加了。

Please sign in to comment.