-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
79 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
linux: | ||
bash ./scripts/build.sh linux | ||
mac: | ||
bash ./scripts/build.sh mac | ||
windows: | ||
bash ./scripts/build.sh windows | ||
alpine: | ||
bash ./scripts/build.sh alpine | ||
all: | ||
bash ./scripts/build.sh all | ||
clean: | ||
rm -rf dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ func Usage() { | |
fmt.Fprintf(os.Stdout, " -ws-listen Websocket address and port to listen on\n") | ||
fmt.Fprintf(os.Stdout, " -ws-connect Websocket Address and port to connect\n") | ||
fmt.Fprintf(os.Stdout, " -daemon Run as a Unix daemon\n") | ||
fmt.Fprintf(os.Stdout, " -mode Run mode(proxy, tunnel). proxy mode default\n") | ||
fmt.Fprintf(os.Stdout, " -debug Debug mode (0, 1, 2, 3)\n") | ||
fmt.Fprintf(os.Stdout, " -pprof Pprof port, disable if empty\n") | ||
fmt.Fprintf(os.Stdout, " -h This usage message\n\n") | ||
|
@@ -57,25 +58,6 @@ func Usage() { | |
fmt.Fprintf(os.Stdout, "Thanks to https://github.com/ryanchapman/go-any-proxy.git\n") | ||
} | ||
|
||
// TunnelUsage 帮助 | ||
func TunnelUsage() { | ||
fmt.Fprintf(os.Stdout, "%s\n\n", versionString("tunneld")) | ||
fmt.Fprintf(os.Stdout, "Usage: %s -l listenaddress -p proxies \n", os.Args[0]) | ||
fmt.Fprintf(os.Stdout, " Proxies anyproxy reqest\n\n") | ||
fmt.Fprintf(os.Stdout, "Mandatory\n") | ||
fmt.Fprintf(os.Stdout, " -l=ADDRPORT Address and port to listen on (e.g., :3001 or 127.0.0.1:3001)\n") | ||
fmt.Fprintf(os.Stdout, "Optional\n") | ||
fmt.Fprintf(os.Stdout, " -p=PROXIES Address and ports of upstream proxy servers to use\n") | ||
fmt.Fprintf(os.Stdout, " (e.g., 10.1.1.1:80 will use http proxy, socks5://10.2.2.2:3128 use socks5 proxy,\n") | ||
fmt.Fprintf(os.Stdout, " tunnel://10.2.2.2:3001 use tunnel proxy)\n") | ||
fmt.Fprintf(os.Stdout, " -daemon Run as a Unix daemon\n") | ||
fmt.Fprintf(os.Stdout, " -debug Debug mode (0, 1, 2, 3)\n") | ||
fmt.Fprintf(os.Stdout, " -h This usage message\n\n") | ||
|
||
fmt.Fprintf(os.Stdout, "Report bugs to https://github.com/keminar/anyproxy or <[email protected]>.\n") | ||
fmt.Fprintf(os.Stdout, "Thanks to https://github.com/ryanchapman/go-any-proxy.git\n") | ||
} | ||
|
||
func versionString(name string) (v string) { | ||
now := time.Now().Unix() | ||
buildNum := strings.ToUpper(strconv.FormatInt(now, 36)) | ||
|