Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmltv proxied incorrectly #155

Open
idaanx opened this issue Aug 29, 2023 · 3 comments
Open

xmltv proxied incorrectly #155

idaanx opened this issue Aug 29, 2023 · 3 comments

Comments

@idaanx
Copy link

idaanx commented Aug 29, 2023

The last few months I've used a couple of different providers, on on some I've encountered issues with the xmltv file.

Looking at the log files, the requested uri is /xmltv.php?username=user&password=pass which is proxied to /xmltv.php?username=user&password=pass&action=xmltv.php. With an error of cannot reach server: connection reset by peer.

To work around this issue, I've used a separate Nginx proxy pass for the uri starting with /xmltv.php to remove the &action=xmltv.php part.

Any possibility of fixing this issue or making the removal of the extra query part optional? I don't know if it is mandatory for other providers.

@olomberg
Copy link

Hi.
I am suffering the same issue. can you please share your nginx config for this part. Thanks.

@idaanx
Copy link
Author

idaanx commented Oct 16, 2023

I am suffering the same issue. can you please share your nginx config for this part. Thanks.

No problem, make sure to update the parts marked within <>, or just use the location = /xmltv.php {...} part with most importantly set $args ""; which deletes the extra arguments. My setup only uses https with cert defined globally, no point of using http and this proxy in my opinion. This way the xmltv bypasses iptv-proxy and goes only through Nginx, so won't show up in the logs.

I hope this helps you out, but might not be a plug-n-play solution for your setup.

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name <yourdomain.tld>;

    access_log off;

    # HSTS (ngx_http_headers_module is required) (63072000 seconds)
    add_header Strict-Transport-Security "max-age=63072000" always;

    allow <yourip>;
    deny all;

    location / {
        proxy_pass http://127.0.0.1:<proxyport or 8080>;

        proxy_set_header Host '';
        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;

        # Disable buffering when the nginx proxy gets very resource heavy upon streaming
        proxy_buffering off;
    }

    location = /xmltv.php {
        set $args "";
        proxy_pass http://<providerdomain.tld>[:<port>]/xmltv.php?username=<username>&password=<password>;

        # Disable buffering when the nginx proxy gets very resource heavy upon streaming
        proxy_buffering off;
    }
}

@onestix
Copy link

onestix commented Jan 20, 2024

Having the same issue here.. @pierre-emmanuelJ, any chance you could take a look at this? Thank you!

Edit: Tried a second xtream provider today (24 Jan). Same issue again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants