TCP tunnel is created but connection is not establishing.
Error is like while making connection
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
My tcp config for nginx is like
server { server_name tcp.example.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /_ws/ {
include proxy_params;
proxy_pass http://localhost:4500;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
location / {
include proxy_params;
proxy_pass http://localhost:4500;
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
}
server { server_name tcp.example.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /_ws/ {
include proxy_params;
proxy_pass http://localhost:4500;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
location / {
include proxy_params;
proxy_pass http://localhost:4500;
}
listen 80;
}
Hello, Here's the actual Nginx configuration I am using for hosting jprq TCP:
server {
server_name tcp.jprq.io;
location = /favicon.ico { access_log off; log_not_found off; }
location /_ws/ {
include proxy_params;
proxy_pass http://localhost:4500;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Origin "";
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
location / {
include proxy_params;
proxy_pass http://localhost:4500;
}
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/jprq.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/jprq.io/privkey.pem;
}
Let me know if you need any further help.
Hey Thank you for response.
I tried this configuration it gives me error like
Traceback (most recent call last):
File "C:\Users\lenovo\anaconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\lenovo\anaconda3\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\lenovo\anaconda3\Scripts\jprq.exe_main.py", line 7, in
Can you tell me cloudflare configuration because when i am trying to make connection with ip address instead of tcp.example.com it makes connection. But with host name timeout error occurs.