Skip to content

Commit

Permalink
remove fetchUrl from tun2socks binary
Browse files Browse the repository at this point in the history
  • Loading branch information
jyyi1 committed Nov 18, 2024
1 parent 5d8d838 commit 7db3d62
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions client/go/outline/electron/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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=...`
Expand All @@ -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")
Expand All @@ -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.")
Expand All @@ -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 {
Expand Down

0 comments on commit 7db3d62

Please sign in to comment.