Draft: Send invite token when asking for gateways, fixes #30
Send invite token when
- cfg.Introducer is not empty (introducer is configured)
- and auth value in introducerURL is not empty (not mandatory)
There is an integration test in the code. You can use it to test this feature. But it's not a helpful test right now, we need to test if the header is really send, which is not easy. I would not test this part - too much effort...? I think I will remove this test again - what do you think?
For you to test:
- run menshen on localhost:8443
- run obsf4proxy:
go run ./cmd/server --addr 127.0.0.1 --port 4430 --remote 127.0.0.1:8443 --state /home/pea/leap/obfsvpn/state -v
- Adjust the cert (needs to be urlencoded) in
pkg/bootstrap/integration_test.go
- run
go test -count=1 -v ./... -run TestIntegrationGetGatewaysWithInviteToken
- To check:
sudo ngrep -d lo -W byline -q port 8443
=>Authorization: Bearer 123.
Edited by Pea Nut