SrainApp / srain

Modern IRC client written in GTK
https://srain.silverrainz.me/
Other
302 stars 34 forks source link

How to set proxy? #389

Closed cuanim closed 4 months ago

cuanim commented 1 year ago

My uni uses a HTTP proxy with user:pass due to which I haven't been able to connect to any channel. However browser(firefox) works fine. Is it possible to set it in srain config file somehow?

SilverRainZ commented 1 year ago

There is no proxy setting for srain now, you can use https://github.com/haad/proxychains

SilverRainZ commented 1 year ago

Duplicated with https://github.com/SrainApp/srain/issues/257

cuanim commented 1 year ago

Thanks. But it's showing this error message now. [ ERR on_connect_fail] Connect failed: Could not connect to irc.rizon.net: Connection refused

Any fix for this?

SilverRainZ commented 1 year ago

can you successfully connect to irc.rizon.net via proxychains? like proxychains nc irc.rizon.net 6667

cuanim commented 1 year ago

Nope, it doesn't seem to connect.

❯ proxychains nc -v irc.rizon.net 6667
[proxychains] config file found: /home/cuanim/.proxychains/proxychains.conf
[proxychains] preloading /usr/lib64/proxychains-ng/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.16
Ncat: Version 7.93 ( https://nmap.org/ncat )
[proxychains] Strict chain  ...  172.31.2.3:8080  ...  irc.rizon.net:6667 <--denied
Ncat: Connection refused.

But if I run it normally, I think it works fine?

❯ nc -v irc.rizon.net 6667
Ncat: Version 7.93 ( https://nmap.org/ncat )
Ncat: Connected to 192.46.212.55:6667.

I am guessing it's a problem with my proxychains.conf. But I can't figure out what. It's the same credentials I used in firefox or setting the env vars like $http. My password has a @, maybe that's what's causing the issue?

strict_chain
proxy_dns
remote_dns_subnet 224

# Some timeouts in milliseconds
tcp_read_time_out 15000
tcp_connect_time_out 8000

[ProxyList]
http 172.31.2.3 8080    username    password
cuanim commented 1 year ago

Ok so changing http to raw in proxychains config allows me to connect via proxychains.

❯ proxychains4 nc -v irc.rizon.net 6697
[proxychains] config file found: /home/cuanim/.proxychains/proxychains.conf
[proxychains] preloading /usr/local/lib/libproxychains4.so
[proxychains] DLL init
Ncat: Version 7.93 ( https://nmap.org/ncat )
[proxychains] Dynamic chain  ...  172.31.2.3:8080  ...  irc.rizon.net:6697  ...  OK
Ncat: Connected to 224.0.0.1:6697.

but now it's showing another error:

[ ERR on_connect_fail] Connect failed: Peer failed to perform TLS handshake: The TLS connection was non-properly terminated.

image

Any clue how to fix this?

PS: Also Merry Christmas and Happy New Year! ^^

SilverRainZ commented 1 year ago

Hello @cuanim, Merry Christmas ^o^ too.

Your proxychains config works fine for me. Can you provide more information?

B.T.W. Your GTK theme is not recognized correctly, what is its name?

rakim-0 commented 1 year ago

What is your proxy server?

It's an ironport thing set up by our university. We have to login into it's proxy to use the LAN and WiFi from our dorms

What is the version of Srain, and where is it installed from?

1.5.0-1.fc37 installed using system package manager (dnf).

What are the GTK version and GLib version?


~
❯ gtk-launch --version
3.24.35
~
❯ ldd --version
ldd (GNU libc) 2.36

> What is your OS?

Fedora Linux 37 (Workstation Edition) x86_64
> B.T.W. Your GTK theme is not recognized correctly, what is its name?

Catppuccin-Mocha. It's working fine now. Just had to update it.
![image](https://user-images.githubusercontent.com/103818757/209793460-c862192f-81fc-47a7-8bd9-e3ecdee847ff.png)
cuanim commented 4 months ago

It's been over a year but I finally figured out how to bypass our proxy. Azure+openvpn ftw If anyone is curious how to do it then I recommend these blogs: https://anjaygoel.github.io/posts/IIT-KGP-Bypass-Internet-Restrictions/ https://openvpn.net/community-resources/connecting-to-an-openvpn-server-via-an-http-proxy/