api proxy - euzu/m3u-filter 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.
username
andpassword
are mandatory for credentials.username
is unique.token
is optional. If defined it should be unique. Thetoken
can be used instead of username+passwordproxy
is optional. If defined it can bereverse
orredirect
. Default isredirect
.server
is optional. It should match one server definition, if not given the server with the namedefault
is used or the first one.max_connections
,status
,exp_date
are optional fields. If they exist they are checked whenconfig.yml
user_access_control
set to true., if you don't need them remove this fields fromapi-proxy.yml
To access the api for:
xtream
use url likehttp://192.169.1.2/player_api.php?username={}&password={}
m3u
use urlhttp://192.169.1.2/get.php?username={}&password={}
or with tokenxtream
use url likehttp://192.169.1.2/player_api.php?token={}
m3u
use 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:
m3u
inplace ofget.php
xtream
inplace ofplayer_api.php
epg
inplace ofxmltv.php
token
inplace ofusername
andpassword
combination
When you define credentials for a target
, ensure that this target has
output
format xtream
or m3u
.
The proxy
property can be reverse
or 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}