Maintenance: listen on all IP interfaces
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
nativeos "os"
|
nativeos "os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
@@ -328,7 +329,7 @@ func _main(ctx context.Context, buildInfo models.BuildInformation,
|
|||||||
unboundLooper, updaterLooper, publicIPLooper, routingConf, logger, httpClient,
|
unboundLooper, updaterLooper, publicIPLooper, routingConf, logger, httpClient,
|
||||||
allSettings.VersionInformation, allSettings.OpenVPN.Provider.PortForwarding.Enabled, openvpnLooper.PortForward,
|
allSettings.VersionInformation, allSettings.OpenVPN.Provider.PortForwarding.Enabled, openvpnLooper.PortForward,
|
||||||
)
|
)
|
||||||
controlServerAddress := fmt.Sprintf("0.0.0.0:%d", allSettings.ControlServer.Port)
|
controlServerAddress := ":" + strconv.Itoa(int(allSettings.ControlServer.Port))
|
||||||
controlServerLogging := allSettings.ControlServer.Log
|
controlServerLogging := allSettings.ControlServer.Log
|
||||||
httpServer := server.New(controlServerAddress, controlServerLogging,
|
httpServer := server.New(controlServerAddress, controlServerLogging,
|
||||||
logger.NewChild(logging.Settings{Prefix: "http server: "}),
|
logger.NewChild(logging.Settings{Prefix: "http server: "}),
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package shadowsocks
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ func (l *looper) Run(ctx context.Context, done chan<- struct{}) {
|
|||||||
|
|
||||||
waitError := make(chan error)
|
waitError := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
waitError <- server.Listen(shadowsocksCtx, fmt.Sprintf("0.0.0.0:%d", settings.Port))
|
waitError <- server.Listen(shadowsocksCtx, ":"+strconv.Itoa(int(settings.Port)))
|
||||||
}()
|
}()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
crashed = true
|
crashed = true
|
||||||
|
|||||||
Reference in New Issue
Block a user