Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI program #1260

Merged
merged 19 commits into from
Dec 16, 2024
Merged

Add CLI program #1260

merged 19 commits into from
Dec 16, 2024

Conversation

atavism
Copy link
Contributor

@atavism atavism commented Dec 10, 2024

This PR adds a CLI program to support running Lantern without a UI. It includes options for configuring proxy addresses and using a local configuration

go build -o lantern-cli ./cli && ./lantern-cli --force-proxy-addr :8448 --stickyconfig true
DEBUG flashlight.common: const.go:69 ****************************** stagingMode: false
DEBUG flashlight.common: version.go:28 Flashlight version is 7.6.150
DEBUG flashlight.common: version.go:31 Setting LibraryVersion to 7.6.150
DEBUG flashlight.common: const.go:65 ****************************** stagingMode: false
DEBUG flashlight.common: version.go:34 Flashlight version is 7.6.150
DEBUG flashlight.common: version.go:37 Setting LibraryVersion to 7.6.150
DEBUG netx: netx.go:49 Enabling NAT64 auto-discovery
DEBUG netx: netx.go:53 Checking for updated NAT64 prefix
 INFO  Starting lantern: configDir %s /Users/paul/Library/Application Support/Lantern
 INFO  Using http proxy address: :8448
 INFO  Using socks proxy address: :0
DEBUG flashlight: flashlight.go:295 Running in app: Lantern

@atavism atavism requested a review from hwh33 December 10, 2024 15:22
@atavism
Copy link
Contributor Author

atavism commented Dec 10, 2024

@hwh33 The CLI currently works with flashlight flags as arguments ("force-proxy-addr", "stickyconfig", etc), but I have another PR here (WIP since we need to change a few things) to add support for extra args like setting the system proxy during start: #1261

@Jovis7
Copy link
Contributor

Jovis7 commented Dec 12, 2024

Copy link
Contributor

@hwh33 hwh33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a build error in the tests, but otherwise this looks good to me. I tested this myself and was able to run Lantern from the command-line and use it as a local proxy.

@hwh33
Copy link
Contributor

hwh33 commented Dec 16, 2024

I have another PR here (WIP since we need to change a few things) to add support for extra args like setting the system proxy during start: #1261

You already closed the linked PR, but for what it's worth, we don't have a use case for this at the moment on the SDK team.

@atavism
Copy link
Contributor Author

atavism commented Dec 16, 2024

Thanks for the review, @hwh33! Test should be fixed now

@atavism atavism merged commit 494b9df into main Dec 16, 2024
1 of 2 checks passed
@atavism atavism deleted the atavism/cli branch December 16, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants