ziozzang / socks5-proxy

Socks5 Proxy with Go Lang. support USER_ID/PASSWORD. able to bypass HTTPS(SNI) censorship
MIT License
33 stars 11 forks source link

Web browser is not promting for login and password #3

Closed OOOlledj closed 1 year ago

OOOlledj commented 1 year ago

Hi there! I've been trying to set up proxy server using your code. I removed srv.AuthNoAuthenticationRequiredCallback (comment out) so proxy works only with provided login and password. I tested it with APT and it successfully updated packages:

Prompt from main.go after calling apt update:

...
2023/08/06 15:20:49 user10 connecting to ru.archive.ubuntu.com:80
2023/08/06 15:20:49 Alowed host: ru.archive.ubuntu.com:80
2023/08/06 15:20:50 User Connected: 'user10'
2023/08/06 15:20:50 user10 connecting to esm.ubuntu.com:443
2023/08/06 15:20:50 Alowed host: esm.ubuntu.com:443  
2023/08/06 15:20:54 Goodbye user10!
...

And i see terminal output, which means that proxy authentication worked perfectly, i got update:

# apt update
Hit:1 http://ru.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://ru.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
...

79 packages can be upgraded. Run 'apt list --upgradable' to see them.

But there is an issue with configuring proxy for Firefox, it does not prompt to enter login and password

2023/08/06 15:33:53 socks5: Conn.serve: Handshake failed: authentication failed
2023/08/06 15:33:54 socks5: Conn.serve: Handshake failed: authentication failed

image image

Do you have any suggestions what is wrong and how to fix it?

OOOlledj commented 1 year ago

After some research I found than authentication window pops up on HTTP proxy type, not SOCKS. The way to apply SOCKS proxy settings is to use extension like FoxyProxy and etc...