api proxy - euzu/tuliprox GitHub Wiki
3. Api-Proxy Config
If you use the proxy functionality,
you need to create a api-proxy.yml configuration.
You can specify the path for the file with the -a cli argument.
The configuration contains the server info for xtream accounts and user definitions.
You can define multiple server with unique names, one should be named default.
Iptv player can act differently and use the direct-source attribute or can compose the url based on the server info.
You should set xtream_skip_live_direct_source and xtream_skip_video_direct_source to true to avoid this problem.
usernameandpasswordare mandatory for credentials.usernameis unique.tokenis optional. If defined it should be unique. Thetokencan be used instead of username+passwordproxyis optional. If defined it can bereverseorredirect. Default isredirect.serveris optional. It should match one server definition, if not given the server with the namedefaultis used or the first one.max_connections,status,exp_dateare optional fields. If they exist they are checked whenconfig.ymluser_access_controlset to true., if you don't need them remove this fields fromapi-proxy.yml
To access the api for:
xtreamuse url likehttp://192.169.1.2/player_api.php?username={}&password={}m3uuse urlhttp://192.169.1.2/get.php?username={}&password={}or with tokenxtreamuse url likehttp://192.169.1.2/player_api.php?token={}m3uuse urlhttp://192.169.1.2/get.php?token={}
To access the xmltv-api use url like http://192.169.1.2/xmltv.php?username={}&password={}
Do not forget to replace {} with credentials.
If you use the endpoints through rest calls, you can use, for the sake of simplicity:
m3uinplace ofget.phpxtreaminplace ofplayer_api.phpepginplace ofxmltv.phptokeninplace ofusernameandpasswordcombination
When you define credentials for a target, ensure that this target has
output format xtreamor m3u.
The proxy property can be reverseor redirect. reverse means the streams are going through m3u-filter, redirect means the streams are comming from your provider.
If you use https you need a ssl terminator. m3u-filter does not support https traffic.
server:
- name: default
protocol: http
host: 192.168.0.3
port: 80
timezone: Europe/Paris
message: Welcome to m3u-filter
- name: external
protocol: https
host: my_external_domain.com
port: 443
timezone: Europe/Paris
message: Welcome to m3u-filter
user:
- target: pl1
credentials:
- {username: x3452, password: ztrhgrGZ, token: 4342sd, proxy: reverse, server: external}
- {username: x3451, password: secret, token: abcde, proxy: redirect}