This adds support for token parsing from environment variables with the format RATHOLE_{service name in uppercase}_TOKEN or RATHOLE_DEFAULT_TOKEN. It also adds token_file and default_token_file to client and server configs. The updated Readme has a more detailed description of the changes.
Testing
Tested using cargo test. I've also added a file inside valid_configs to test for the file token and a new test case for environment variable parsing.
Todo
[ ] Update the Docker Hub Readme with environment variable parsing.
Issues
Solves #264 and #218
Info
This adds support for token parsing from environment variables with the format
RATHOLE_{service name in uppercase}_TOKEN
orRATHOLE_DEFAULT_TOKEN
. It also addstoken_file
anddefault_token_file
to client and server configs. The updated Readme has a more detailed description of the changes.Testing
Tested using
cargo test
. I've also added a file insidevalid_configs
to test for the file token and a new test case for environment variable parsing.Todo