Skip to content

Instantly share code, notes, and snippets.

View arenadoon's full-sized avatar
✏️

Arena Artoon arenadoon

✏️
  • 16:25 (UTC +07:00)
View GitHub Profile
@arenadoon
arenadoon / README.md
Created July 22, 2024 07:54 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@arenadoon
arenadoon / secure_link.md
Created July 22, 2024 07:02 — forked from goregrish/secure_link.md
Nginx ngx_http_secure_link_module and PHP
# Hard-code DNS resolver to Google's servers
#
# *Setup*
# # download this file while DNS is working
# curl https://gist.github.com/turadg/7876784/raw --output ~/google-resolv.conf
# # replace your old DNS resolver
# sudo cp /etc/resolv.conf /etc/resolv.conf.auto && sudo mv ~/google-resolv.conf /etc/resolv.conf
# # make it uneditable so Vagrant doesn't clobber it
# sudo chattr +i /etc/resolv.conf
@arenadoon
arenadoon / install_ffmpeg_libfdkaac.sh
Created June 22, 2024 20:03 — forked from chemputer/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@arenadoon
arenadoon / install_ffmpeg_libfdkaac.sh
Created June 22, 2024 20:03 — forked from chemputer/install_ffmpeg_libfdkaac.sh
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@arenadoon
arenadoon / os.sh
Last active April 13, 2024 21:50 — forked from vintagewang/os.sh
Kernel sysctl configuration file for Linux
#!/bin/sh
echo '# ======================ของเซิฟตัวเล่น======================' >> /etc/sysctl.d/99-linux.internal.conf
echo '# sysctl settings are defined through files in' >> /etc/sysctl.d/99-linux.internal.conf
echo '# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.' >> /etc/sysctl.d/99-linux.internal.conf
echo '#' >> /etc/sysctl.d/99-linux.internal.conf
echo '# Vendors settings live in /usr/lib/sysctl.d/.' >> /etc/sysctl.d/99-linux.internal.conf
echo '# To override a whole file, create a new file with the same in' >> /etc/sysctl.d/99-linux.internal.conf
echo '# /etc/sysctl.d/ and put new settings there. To override' >> /etc/sysctl.d/99-linux.internal.conf
echo '# only specific settings, add a file with a lexically later' >> /etc/sysctl.d/99-linux.internal.conf
@arenadoon
arenadoon / fa-link
Created March 29, 2024 21:30 — forked from Alecto/fa-link
Fontawesome link code
@arenadoon
arenadoon / speedtest-server-list.txt
Created February 28, 2024 17:00 — forked from stawidy/speedtest-server-list.txt
Speedtest 节点列表
17584) Chongqing Mobile Company (Chongqing, CN)
5726) China Unicom Chong Qing Branch (Chongqing, China)
5530) CCN (Chongqing, China)
19076) China Telecom (ChongQing, China)
20054) YunJinTianFu (Chengdu, China)
11444) University of Electronic Science and Technology of China (Chengdu, China)
2461) China Unicom (Chengdu, China)
4575) China Mobile Group Sichuan (Chengdu, China)
16398) China Mobile,GuiZhou (Guiyang, China)
5292) China Mobile Group Shaanxi Company Limited (Xi'an, China)
@arenadoon
arenadoon / stream.php
Last active October 12, 2021 06:58 — forked from Bartvelp/stream.php
PHP seekable stream external video with url and range header support
<?php
/*
Hi!
So this gist is not a very good implementation, it works great in chrome but the seeking is sort of glitched in firefox.
But it does the job and I hope it can help out!
(Please let me know how to improve this)
*/
ini_set('max_execution_time', 0);
$url = "http://mirrors.standaloneinstaller.com/video-sample/jellyfish-25-mbps-hd-hevc.m4v"; //just some sample url, please dont overload their servers
@arenadoon
arenadoon / allow
Created September 4, 2019 22:50 — forked from Nilpo/allow
CSF Allow AND Ignore Cloudflare IPv4 IP's.
for i in `curl https://www.cloudflare.com/ips-v4`; do csf -a $i; done