Skip to content
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

Add random socks5 port to connctions and add related variable to use in local commands #771

Merged
merged 1 commit into from Feb 22, 2021
Merged

Add random socks5 port to connctions and add related variable to use in local commands #771

merged 1 commit into from Feb 22, 2021

Conversation

syco
Copy link
Contributor

@syco syco commented Feb 15, 2021

Following the previous epiphany on pull request #762 I've reimplemented this function as a local command.
The functionality I had intended is still the same, and I'm happy with both implementations, but I think this way it integrates better with what's already there.

Just as an example, the command I use with this new variable is: bash -c 'TMP_HOME="$(mktemp -d)"; HOME="${TMP_HOME}" /usr/bin/chromium --incognito --proxy-server="socks5://localhost:<SOCKS5_PORT>" --proxy-bypass-list="<-loopback>"; rm -Rf "${TMP_HOME}"'

Thanks

Signed-off-by: Syco <alberto.rinaudo+torann@gmail.com>
@gfrenoy gfrenoy added this to the 6.4.0 milestone Feb 16, 2021
@gfrenoy gfrenoy merged commit 8322f2a into asbru-cm:loki Feb 22, 2021
@gfrenoy
Copy link
Contributor

gfrenoy commented Feb 27, 2021

Alberto, as this option would only work with SSH terminals, shouldn't we move the option from the "Advanced" panel to the specific SSH options panel ?

Or said differently : does that option has any sense for VNC or RDP terminals ?

@syco
Copy link
Contributor Author

syco commented Mar 1, 2021

Yes, it probably should be in the SSH advanced options.
But that panel is built programmatically and current values are in the 'options' variable that needs to be exploded and parsed.
And I didn't find a variable I could reference to copy how it works.

@gfrenoy
Copy link
Contributor

gfrenoy commented Mar 1, 2021

Indeed, nothing is really foreseen for Ásbrú specific options.

I tried the following (this could be extended later to other needs):

  • using a dummy option "#Ásbrú#RST# (RST = Random Socks Tunnel)
  • any dummy option is cleaned up when starting asbru_conn (so it is not considered)
  • replaced socks5 tunnel active by a check for that dummy option in the connection options

You might need to reconfigure your connection ; there is no migration path foreseen.

Let me know what your thoughts...

@syco
Copy link
Contributor Author

syco commented Mar 2, 2021

You made me do work... joke aside...
that works, but we could also add another configuration parameter along side with 'options' (I called it 'connection options') that is an array, and contains specific configurations for every connection method.
This way we can access it directly without the parsing functions.
In time all options could be migrated to this new array.
The only wrinkle is that it needs to be implemented, even as an empty array, for all connection methods.

Unless I forgot something, this is it: loki...syco:loki-feature-socks-tunnel

@gfrenoy
Copy link
Contributor

gfrenoy commented Mar 3, 2021

Yeah, indeed, way much better 👏 👏 🥳 !!!

Thanks a lot :)

Let me merge this into loki.

gfrenoy added a commit that referenced this pull request Mar 3, 2021
…unnel (#771)

Signed-off-by: Syco <alberto.rinaudo+torann@gmail.com>
Co-authored-by: Syco <alberto.rinaudo+torann@gmail.com>
@syco syco deleted the loki-feature-sock5-local-command branch April 8, 2021 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants