Skip to content

Instantly share code, notes, and snippets.

View lingaoyi's full-sized avatar

L.G.Y lingaoyi

View GitHub Profile
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -d 127.0.0.0/8 ! -i lo -j REJECT --reject-with icmp-port-unreachable
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
@chenshaoju
chenshaoju / sysctl.conf
Last active September 7, 2023 06:31
sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additonal system variables
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3
@aa65535
aa65535 / ss-install.md
Last active April 7, 2024 13:03
shadowsocks-libev install at Debian or CentOS

Debian

cd /tmp
# 编译环境准备&安装依赖包
apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto git
# 克隆源码
git clone --recursive https://github.com/shadowsocks/shadowsocks-libev.git
# 开始编译
@seventhmoon
seventhmoon / Helper.java
Last active August 5, 2019 13:10
Get M3U8 Playlist from TVB
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;
public class Helper {
public enum Channel {HDJ, J2, INEWS};
public enum Quality {QUALITY_720P, QUALITY_360P};
private static String[] links720p = {"http://token.tvb.com/stream/live/hls/mobilehd_hdj.smil",
"http://token.tvb.com/stream/live/hls/mobilehd_jade.smil",