a-h / gemini

MIT License
45 stars 3 forks source link

How to force use ipv4? #12

Closed viktor02 closed 3 years ago

viktor02 commented 3 years ago

Hi, i have a problem connecting to my site. If I connect from the server to the server - it works, but if I try to connect from my computer to the server - it gives me an error. I think it might be due to incorrect ipv6 settings. Until I figured out ipv6, Is it possible to force the server to listen for an ipv4 connection? Server:

[root@vitka-k ~]$ lsof -i :1965
COMMAND   PID USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
gemini  27625 root    3u  IPv6 14699327      0t0  TCP *:1965 (LISTEN)

Server-to-server works fine

[root@vitka-k ~]$ ./gemini request --insecure --verbose gemini://vitka-k.ru
20 text/gemini; charset=utf-8
# Hello

This is my gemini site

But client:

❯ .\gemini.exe request --insecure --verbose gemini://vitka-k.ru/
Request failed: gemini: error connecting: dial tcp [2606:4700:3037::ac43:c058]:1965: i/o timeout
a-h commented 3 years ago

I'm getting an IO timeout via IP v4 too:

Error making request                                                                                                                                                                                                

URL: gemini://vitka-k.ru                                                                                                                                                                                            
Message: gemini: error connecting: dial tcp 104.21.20.106:1965: i/o timeout                                                                                                                                         

Have you opened up your firewall on port 1965 to external traffic?

viktor02 commented 3 years ago

The problem was with cloudflare - they only proxy http(s) traffic. When I chose simple dns everything started working.

❯ .\gemini.exe request --insecure --verbose gemini://vitka-k.ru/
20 text/gemini
# Hello

This is my gemini site
a-h commented 3 years ago

Great, sounds like you're all up and running. I can access your Gemini capsule no problem at all.