chrome.proxy API not authenticating SOCKS5

444 views
Skip to first unread message

Mohammad Moaid

unread,
Apr 3, 2024, 8:22:44 AM4/3/24
to Chromium Extensions
Hi everyone, 
So I am trying to build a VPN extension, I have a bunch of servers configured as SOCKS5 servers to provide VPN functionality, 
the issue is they need to be protected with username and password, but chrome.proxy API doesn't authenticate this type of servers, when I remove the username and password from the servers then I can connect directly, but again, this is not safe
using chrome.webRequest.onAuthRequired doesn't work too because it was designed to send the authentication inside the headers, which is how it works for http/https servers not socks5 servers, 
I am so lost currently, And I don't know how to do it, I know there is no any direct way to implement this, I am asking what are other options that I can implement to achieve this functionality?
I thought of putting https server in the middle, but again how will it know to which server should it connect? because i have too many servers and i don't know how to make it act as a router,
Another idea was to create a server side application which uses websocket to pass my request and authenticate the socks5 but how much traffic can websocket handle, 
Another idea was to use PAC but again no success.
help please, I am so lost :(

Browser Extenstion

unread,
Apr 3, 2024, 12:17:54 PM4/3/24
to Chromium Extensions, Mohammad Moaid
Chrome does not support authentication for SOCKS5
Use HTTPS/S instead.
Reply all
Reply to author
Forward
0 new messages