乐于分享
好东西不私藏

广西移动直播源代理及源码

广西移动直播源代理及源码

      广西移动直播源只能在广西区内的移动网络才可以播放,电信、联通、广电及区外网络是无法播放的,经过代理后全部网络可以用。
     我是用斐讯N1刷了iStoreOS代理的,放在家里24小时开机,只要是省电。系统里安装Nginx,直接用SSH操作。登陆后直接复制代码回画就完成。
代码:
cat << 'EOF' > /root/video_proxy/nginx.confworker_processes auto;events { worker_connections 1024; }http {    merge_slashes off;     resolver 114.114.114.114 8.8.8.8 valid=300s;    resolver_timeout 5s;    server {        listen 8081;        listen [::]:8081;        server_name _;        location /PLTV/ {            proxy_pass http://cdnrrs.gx.chinamobile.com;            proxy_set_header Host cdnrrs.gx.chinamobile.com;            proxy_redirect ~*^https?://([^/]+)(.*)$ http://$http_host/http://$1$2;            sub_filter_types *;            sub_filter 'http://' 'http://$http_host/http://';            sub_filter_once off;            proxy_buffering off;            proxy_request_buffering off;            proxy_set_header Accept-Encoding ""            proxy_set_header User-Agent "VLC/3.0.21 LibVLC/3.0.21";        }        location ~* ^/(https?):/+(?<t_host>[^/]+)(?<t_uri>.*)$ {            proxy_pass $1://$t_host$t_uri$is_args$args;            proxy_set_header Host $t_host;             proxy_redirect ~*^https?://([^/]+)(.*)$ http://$http_host/http://$1$2;            proxy_buffering off;            proxy_set_header Accept-Encoding "";            proxy_set_header User-Agent "VLC/3.0.21 LibVLC/3.0.21";        }        location / {            return 200 "N1 IPTV Proxy Gateway Active!";        }    }}EOF
防火墙设置:iStoreOS 必须开启 “MSS 锁定”,否则视频大包容易在公网丢失
外网访问格式
原播放地址为:
http://cdnrrs.gx.chinamobile.com/PLTV/77777777/224/3221226324/index.m3u8?servicetype=1&IASHttpSessionId=OTT
代理后播放地址为:

http://ipv6:8081/PLTV/77777777/224/3221226324/index.m3u8?servicetype=1&IASHttpSessionId=OTT

我的小水管,就不帖出我的IP了。