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

Authentication Socket syntax #26

Open
acegilz opened this issue Dec 8, 2015 · 3 comments
Open

Authentication Socket syntax #26

acegilz opened this issue Dec 8, 2015 · 3 comments

Comments

@acegilz
Copy link

acegilz commented Dec 8, 2015

I'm trying to connect to a socks5 proxy that requires credentials. I'm using socksify-ruby but can't stop receiving this error

SOCKSError::NotAllowed: connection not allowed by ruleset

From what I read it's an authentication issue but I am unable to find the right syntax.

Currently I'm trying this:

 proxy: 'socks://username:password@proxy-nl.privateinternetaccess.com:1080' 

I believe this is already supported however I would like if someone could tell me a request example
Thanks in advance

@MatzFan
Copy link
Collaborator

MatzFan commented Jul 4, 2022

I would like to add authentication support to socksify and the code is all ready to go, based on #33 & #24 (thanks to @ojab & @musybite). What a need is a test case. Can someone please point me at somewhere where I can test socks authentication, thanks.

@kornate
Copy link

kornate commented May 3, 2023

Hi @MatzFan! You can easily set up a local SOCKS proxy with authentication on any Linux server using via SSH. I've tailored these instructions for Ubuntu:

  1. Make sure PasswordAuthentication yes is in your /etc/ssh/sshd_config using sudo nano, restart SSH with sudo systemctl restart ssh or sudo service ssh restart after making changes.

  2. On your local machine, create the SOCKS-over-SSH proxy locally with ssh -D 1080 -f -C -q -N -p 22 <vps_username>@<vps_ip>. When prompted for a password, use the VPS password.

This can also be done without using a VPS, if you run an ssh server on your local machine instead. It could be done with Github Actions I imagine too.

I hope this helps! Would love to see this merged as it's also blocking lostisland/faraday pull #992. Thank you for taking over this repo as maintainer!

@MatzFan
Copy link
Collaborator

MatzFan commented May 7, 2023

Thanks @kornate, I'll look into doing this in Github actions and try and get a release out with authentication tested.

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

No branches or pull requests

3 participants