pierre-emmanuelJ / iptv-proxy

Reverse proxy on iptv m3u and m3u8 file and xtream codes client api
GNU General Public License v3.0
478 stars 139 forks source link

401 using --xtream-api-get #130

Open wilsoniain opened 1 year ago

wilsoniain commented 1 year ago

Hi. Getting a 401 trying to proxy xtream with use of --xtream-api-get as m3u not available from provider.

I can directly connect to xtream server using:

https://github.com/PhunkyBob/iptv_playlist_browser

However using below configuration I get a 401 error when accessing following url:

http://localhost:8080/iptv.m3u?username=xxxxxxxxx&password=xxxxxxxx

I guess I may be using --xtream-api-get incorrectly within the configuration or local m3u url? As example not shown in the readme, I thought this may be useful to post for others.

[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /iptv.m3u                 --> github.com/pierre-emmanuelJ/iptv-proxy/pkg/server.(*Config).getM3U-fm (5 handlers)
[GIN-debug] POST   /iptv.m3u                 --> github.com/pierre-emmanuelJ/iptv-proxy/pkg/server.(*Config).getM3U-fm (5 handlers)
[GIN-debug] Listening and serving HTTP on :8080
[GIN] 2022/08/13 - 07:34:50 | 401 |     185.781µs |             ::1 | GET      "/iptv.m3u?username=xxxxxxx&password=xxxxxxxxxxx"

Configuration:

iptv-proxy   --port 8080 \
         --hostname localhost \
             ## put xtream flags if you want to add xtream proxy
             --xtream-user remoteuser \
             --xtream-password remotepass \
             --xtream-base-url remoteurl:port \
         --xtream-api-get
             --user localuser \
             --password localpass
stuckwi commented 1 year ago

Need help with this too. I am even stuck at getting a docker to run using the xteam-api-get. @wilsoniain did you install directly in OS or running inside docker?

thebatfink commented 1 year ago

Also having trouble with this (m3u not available from provider). Did either of you figure this out?

wilsoniain commented 1 year ago

Gave up in the end.... Used python from https://github.com/PhunkyBob/iptv_playlist_browser to generate periodic m3u and loaded that into tvheadend server

thebatfink commented 1 year ago

I really wish he would turn on discussions or give us a discord server we could talk about this proxy. The documentation is not sufficient. So you solution is XC codes only and gets you around them not allowing m3u? My provider is going to do this soon, trying to find a work around. I want the software because I want to run it on a local server or container with macvlan so I can tunnel that specific IP down a VPN tunnel but not the traffic from the rest of my local network / client device IPs. I was using xteve which works perfectly for this case but with m3u going away and no XC in xteve, now I am stuck.