From 7db3d624f281c94a3e2e6afb972c8896cb4b220e Mon Sep 17 00:00:00 2001 From: Junyi Yi Date: Mon, 18 Nov 2024 15:40:50 -0500 Subject: [PATCH] remove fetchUrl from tun2socks binary --- client/go/outline/electron/main.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/client/go/outline/electron/main.go b/client/go/outline/electron/main.go index fbca7283535..79230f4d1d9 100644 --- a/client/go/outline/electron/main.go +++ b/client/go/outline/electron/main.go @@ -69,8 +69,6 @@ var args struct { checkConnectivity *bool dnsFallback *bool version *bool - - fetchUrl *string } var version string // Populated at build time through `-X main.version=...` @@ -86,8 +84,6 @@ var version string // Populated at build time through `-X main.version=...` // // - Connectivity Check: If you run the app with `-checkConnectivity`, it will test the proxy's connectivity // and exit with the result printed out to standard output. -// - Fetch Resource: If you run the app with `-fetchUrl`, it will fetch the content from the specified -// URL and exit with the content printed out to standard output. func main() { // VPN routing configs args.tunAddr = flag.String("tunAddr", "10.0.85.2", "TUN interface IP address") @@ -103,9 +99,6 @@ func main() { // Check connectivity of transportConfig and exit args.checkConnectivity = flag.Bool("checkConnectivity", false, "Check the proxy TCP and UDP connectivity and exit.") - // Fetch content of the given URL value and exit - args.fetchUrl = flag.String("fetchUrl", "", "Fetch the content from the given URL and exit.") - // Misc args.logLevel = flag.String("logLevel", "info", "Logging level: debug|info|warn|error|none") args.version = flag.Bool("version", false, "Print the version and exit.") @@ -117,15 +110,6 @@ func main() { os.Exit(exitCodeSuccess) } - if *args.fetchUrl != "" { - result := outline.FetchResource(*args.fetchUrl) - if result.Error != nil { - printErrorAndExit(result.Error, exitCodeFailure) - } - fmt.Println(result.Content) - os.Exit(exitCodeSuccess) - } - setLogLevel(*args.logLevel) if len(*args.transportConfig) == 0 {