socksify-ruby icon indicating copy to clipboard operation
socksify-ruby copied to clipboard

Authentication Socket syntax

Open acegilz opened this issue 10 years ago • 3 comments

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:[email protected]:1080' 

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

acegilz avatar Dec 08 '15 03:12 acegilz

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.

MatzFan avatar Jul 04 '22 15:07 MatzFan

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!

kornate avatar May 03 '23 19:05 kornate

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

MatzFan avatar May 07 '23 18:05 MatzFan