You quote my post but you aren't using it. I don't use it with cloudflare, but I have been using that config for more than a year.
This line sends all of the query params and adds the ip, just in case, to XBT Code:
proxy_pass http://127.0.0.1:2710/$1/announce$is_args$args&ip=$remote_addr; Code:
rewrite ^(.*)$ $1?ip=$remote_addr break; Code:
proxy_pass http://127.0.0.1:4000/; Hope you get it sorted. |
I should have been more clear, let me try that agian
I found both NGINX configurations listed in the feed to get client connections working. Like you, I'm not involving Cloudflare either my trouble is nether solution get the clients public IPs to my XBT.
Code:
# START REV-PROXY CONF This is the copy of XBT that I'm currently using. wget https://github.com/OlafvdSpek/xbt/archive/master.zip Thanks again for always replying to my questions but I understand I'm asking for your time. I would be glad to toss a PayPal donation your way or repay the favor with my skills somehow. |
The only difference that I see in what you are using compared with mine is you don't have
Code:
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; Code:
include snippets/ssl.conf; Code:
listen 8443 ssl http2; Also, I have recently change this to on Code:
proxy_buffering off; Just to be sure, you have XBT listening on port 4000? My debug page shows the real ip address of the clients. Otherwise, I don't see any issues. |
Troubleshooting continued
Yes, my XBT is listening on port 4000 which is actively working correctly via HTTP.
I don't think it's the SSL config because I lose the real client IPs with SSL completely disabled, but here is my SSL config. vi /etc/nginx/snippets/ssl.conf Code:
# START SSL CONF Code:
mysql_host = localhost Bump: I've now taken captures from my loopback on my XBT listening port 4000 so i can just see traffic forwarded from NGINX. Both config options show x-forwarded-for and others populated with the real client IP. (see images) Is there some mod version of XBT that understands forwarded header data? https://i.ibb.co/6sh5ygC/cap1.pnghttps://i.ibb.co/Ps2gnHj/cap2.png |
XBT gets the ip address from the query parameter ip.
That's why I specifically add it to the query string here Code:
proxy_pass http://127.0.0.1:4000/$1/announce$is_args$args& => ip=$remote_addr <=; |
parameter ip not processed by XBT tracker
I've deeply tested both NGINX configuration options and both successfully input the parameter ip into the /GET URL. However, I'm still seeing only the loopback IP on my debug page. Here is some output from my XBT access log (IP & PID masked).
Code:
1618364669 ::ffff:127.0.0.1 51354 GET /d005231e*****7fa30ff8bf0378/announce?info_hash=b%60%7F%FBw%E1%CD%CA%CC%12%29%00%82%06%D8%B6%CB%24%18y&peer_id=-lt0D60-%15l%DCj%3A%B7g%23%03%91%A0%86&key=29b87ff9&compact=1&port=20035&uploaded=0&downloaded=8952338711&left=0&ip=188.209.**.9 HTTP/1.0 What else could be preventing XBT from ingesting the IP in the URL? Do I need an XBT mod? Thanks for sticking with me on this subject. :cool: |
What does the XBT access log show for the same connection?
Show 2 from each so we can compare. |
Both NGINX configs with access logs from two clients
FOR REFERANCE WITHOUT NGINX (WORKING)
Code:
1618375670 ::ffff:188.209.**.9 44016 GET /d005231e8f5******a30ff8bf0378/announce?info_hash=%B82%B5%0A%A2%F8x%1CS%24%8E%A6%DC%2A%FA%40%E5%BFz%EB&peer_id=-lt0D60-%F6G%D3%0C%B1%9Bdz%A9%D6%1D%87&key=485194ee&compact=1&port=20035&uploaded=0&downloaded=0&left=0 HTTP/1.1 Code:
Code:
1618375162 ::ffff:127.0.0.1 51474 GET /03260510******d7d0405e2b449/announce?info_hash=X8e%B0%838%7C%40%C4%A6%2C%29%A8%3B%BE%A31uH%EF&peer_id=-lt0D60-%D7ePZ%DA%93%23%7E%BF%12%2F%8B&key=726ad0f6&compact=1&port=20035&uploaded=0&downloaded=0&left=0&ip=188.209.**.9 HTTP/1.0 Code:
# START REV-PROXY CONF Code:
1618374805 ::ffff:127.0.0.1 51472 GET /03260510d*******7d0405e2b449/announce?ip=188.209.**.9&info_hash=X8e%B0%838%7C%40%C4%A6%2C%29%A8%3B%BE%A31uH%EF&peer_id=-lt0D60-%D7ePZ%DA%93%23%7E%BF%12%2F |
The IP is being passed to XBT, so the issue is not your nginx config. I don't use a stock version of XBT so I can't say with certainty that there isn't an issue with XBT. But my version only differs slightly where it's checking for the IP address.
Maybe someone else can speak up and offer some insight? Are you running XBT on the same machine as the client you are testing with? |
No my XBT tracker is cloud hosted with my custom front-end project. My clients are runnings on other seedboxes.
I'm dying to get my tracker secured...Any chance you could share your version of just XBT tracker? Or the modifications to make it process the IP parameter? |
All times are GMT +2. The time now is 06:42. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.