-
Notifications
You must be signed in to change notification settings - Fork 81
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
Check environment variable for transit relay server #281
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #281 +/- ##
==========================================
- Coverage 37.69% 37.59% -0.10%
==========================================
Files 19 19
Lines 3221 3221
==========================================
- Hits 1214 1211 -3
- Misses 2007 2010 +3 ☔ View full report in Codecov by Sentry. |
I think this could be compatible with the original python implementation just by renaming the variable https://github.com/magic-wormhole/magic-wormhole/blob/master/src/wormhole/cli/cli.py#L93 This makes it a little inconsistent with the parameter, but it might be worth it. |
I have also added |
Actually, in python, the TRANSIT_HELPER is the relay server, and the RELAY_URL is the mailbox rendezvous server. This is all more confusing than I thought. You know what? Maybe this was a bad suggestion by me, and the original name you had was much better 😂 Let's forgo compatibility, and stay with the original names derived from the command line arguments 🙈 |
I'm not opposed to changing the Python env-vars ... something with "Mailbox" in it is my preference for the mailbox server... I would keep backwards-compat for a release or two in Python somehow .. but In any case, I find "relay" to be confusing especially because there is a different / related server that actually relays traffic 🤪 |
So technically the mailbox server is called rendezvous server right? Should we rename the command line arg to |
It has been called both (and also "relay") but I'm trying to "standardize" on "Mailbox Server", approximately (as it fits with the analogies in the documentation / specifications better, among other reasons). I will change the Python CLI to match |
Add environment variable support for relay server configuration
Add the
env
feature to clap and allow setting relay servers via theWORMHOLE_RELAY_SERVER
environment variable in addition to the--relay-server
CLI flag.I'm using my own relay server for improved speed and to reduce load on the public default relay server. By adding environment variable support, I can configure it once and forget about it instead of having to specify it on every wormhole invocation.
Changes
env
feature in clapWORMHOLE_RELAY_SERVER
Testing
The relay server can now be configured via:
--relay-server
CLI flag (highest priority)WORMHOLE_RELAY_SERVER
environment variable