psanford / wormhole-william

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
MIT License
1.09k stars 56 forks source link

rc file for setting default configuration of the client #7

Closed sarcasticadmin closed 4 years ago

sarcasticadmin commented 4 years ago

Description

It would be nice to leverage some type of .rc file for wormwhole-william. Especially for those who have a different relay url which is the case for myself.

This is still open on the python wormhole project as well: https://github.com/warner/magic-wormhole/issues/338 (environment variable and config file are discussed here) So it might be worth aligning it so that both clients can use the same config.

psanford commented 4 years ago

Thanks for opening this issue!

I've added support for specifying the relay-url via an environment variable (WORMHOLE_RELAY_URL) like the python client does (in 4924ea821fff9daa72c2b5a80069cedab86b6b72). That should make it easier to globally configure a different default relay server.

Lets hold off supporting a config file for now. I think we can reopen that discussion if/when they implement that in the python client.

sarcasticadmin commented 4 years ago

@psanford Thanks for getting to this so quickly. I definitely agree with holding off on the config file.

wavexx commented 4 years ago

I was attempting to use my own relay for a large org, and I would greatly vouch for a config file (both system and user for overrides). An environment var is annoying to set for large deployment and cannot be changed system-wide during the lifetime of a session, so it's not a great substitute.

Debian is patching public_relay.py with it's own, but I cannot just let the public relay for my org (I need to have reliable traffic in the order of 100Mb/s). I repackaged debian's own package with my relay for the moment.