Fix: update proxy config api

This commit is contained in:
Dreamacro
2018-08-12 02:23:46 +08:00
parent 410b272b50
commit 0208e32933
7 changed files with 109 additions and 124 deletions

View File

@ -1,6 +1,7 @@
package config
import (
"fmt"
"strings"
)
@ -10,3 +11,10 @@ func trimArr(arr []string) (r []string) {
}
return
}
func genAddr(port int, allowLan bool) string {
if allowLan {
return fmt.Sprintf(":%d", port)
}
return fmt.Sprintf("127.0.0.1:%d", port)
}