Support session reuse
Closed this issue · 6 comments
We have weblogin + 2FA (pin via email) which is not supported by gof5. But it would be really helpfull if gof5 would support session reuse: gof5 --session abcdef123123123123
.
This way one could at least login and do the 2FA stuff to get a valid session which thencould be used to connect to the vpn via gof5 (with configurable routing - which would be great!).
Maybe it helps to have a look at how it is done here: https://github.com/zrhoffman/f5vpn-login
@fpauser you can set session ID inside ~/.gof5/cookies.yaml file. Its format is:
example.com:
- MRHSession=sessionID
Thanks for the hint. This seems to work somehow - but now I am getting an "invalid xml" error:
2020/09/22 12:46:47 Reusing saved HTTPS VPN session for xxx.xxxx.xxx
2020/09/22 12:46:48 failed to parse VPN profiles: failed to unmarshal a response: XML syntax error on line 47: invalid sequence "--" not allowed in comments
@fpauser can you share the debug log?
New v0.0.7 release also supports a --session
parameter, try it out.
It works - thanks!