This add-on intends to improve user experience of Chinese video sites. It also has a high risk of violating the local law of China. Use at your own risk! ##Manual (用户手册) ###How to Use###使用说明
Combines. minifies, and serves CSS or Javascript files. Minify is an HTTP server for JS and CSS files. It compresses and combines files and serves it with appropriate headers, allowing conditional GET or long-Expires.
Before
After
The stats above are from a brief walkthrough which shows how easy it is to set up Minify on an existing site. It eliminated 5 HTTP requests and reduced JS/CSS bandwidth by 70%. Relative URLs in CSS files are rewritten to compensate for being served from a different directory.
Minify is designed for efficiency, but, for very high traffic sites, it will probably serve files slower than your HTTPd due to the CGI overhead of PHP. See the FAQ and CookBook for more info.
Minify should work fine with files encoded in UTF-8 or other 8-bit encodings like ISO 8859/Windows-1252. By default Minify appends ";charset=utf-8" to the Content-Type headers it sends.
Acknowledgments
Minify was inspired by jscsscomp by Maxim Martynyuk and by the article Supercharged JavaScript by Patrick Hunlock. The JSMin library used for JavaScript minification was originally written by Douglas Crockford and was ported to PHP by Ryan Grove specifically for use in Minify.
As we know, web is very popular nowadays. It is related to our life in all respects such as solving the problems, shopping, sending emails and so on. In order to catch its steps, I begin to learn web knowledge through the web-class in SYSU. Here are some web projects achieved by myself. I will be very pleasure to hear from you to guide me to a better place. from https://github.com/linwh8/ModernWebPrograming
A lightweight kernel module/iptables extension for sending spoofed TCP packets. This is a kernel-space, partial implementation of this paper
Build
Prerequisites:
kernel headers
xtables headers
Kernel Module
$ make # insmod xt_SPOOFTCP.ko
iptables Extension
Copy libxt_SPOOFTCP.so to iptables library folder, say /lib/xtables. Run iptables -j SPOOFTCP --help and see if it prints the help message of this module.
This will sent a spoofed SYN,ACK packet prior to the matched (original) SYN packet. There are mechanisms to prevent the spoofed packets from being tracked by nf_conntrack or being matched by another SPOOFTCP rule.
Known issue
Incompatible with SNAT because the spoofed packets bypass nf_conntrack. Use either one of the workarounds below:
Use --masq parameter. It re-implements MASQUERADE statelessly, but it won't work in case of port changes or custom SNAT rules.
Patch the kernel to add a chain in raw table. The chain is hooked after SNAT. Tested on kernel 4.14 and 4.19
from https://github.com/LGA1150/netfilter-spooftcp
----
A kernel module to turn MASQUERADE into full cone SNAT.
Implementation of RFC3489-compatible full cone SNAT. Assuming eth0 is external interface:
iptables -t nat -A POSTROUTING -o eth0 -j FULLCONENAT #same as MASQUERADE iptables -t nat -A PREROUTING -i eth0 -j FULLCONENAT #automatically restore NAT for inbound packets
Currently only UDP traffic is supported for full-cone NAT. For other protos FULLCONENAT is equivalent to MASQUERADE.
Confirm the kernel configuration option CONFIG_NF_CONNTRACK_EVENTS is enabled. If this option is disabled on your system, enable it and rebuild your netfilter modules.
Kernel Module
$ make # insmod xt_FULLCONENAT.ko
Iptables Extension
Copy libipt_FULLCONENAT.c to iptables-source/extensions.
Under the iptables source directory, ./configure(use --prefix to replace your current iptables by looking at which iptables), make and make install
Insert following section into kernel-source/net/ipv4/netfilter/Kconfig right after config IP_NF_TARGET_NETMAP section:
config IP_NF_TARGET_FULLCONENAT tristate "FULLCONENAT target support" depends on NETFILTER_ADVANCED select NETFILTER_XT_TARGET_FULLCONENAT ---help--- This is a backwards-compat option for the user's convenience (e.g. when running oldconfig). It selects CONFIG_NETFILTER_XT_TARGET_FULLCONENAT.
Insert following section into kernel-source/net/netfilter/Kconfig right after config NETFILTER_XT_TARGET_NETMAP section:
config NETFILTER_XT_TARGET_FULLCONENAT tristate '"FULLCONENAT" target support' depends on NF_NAT ---help--- Full Cone NAT
To compile it as a module, choose M here. If unsure, say N.
Run make menuconfig and select: Networking support -> Network options -> Network packet filtering framework (Netfilter) -> IP: Netfilter Configuration -> FULLCONENAT target support
from https://github.com/Chion82/netfilter-full-cone-nat
shadowsocks-libev从2.5.1 版本开始,正式支持了 access control list (ACL) 功能,在 3.0.6 版本 ss-local 的內置分流功能在這個 commit之後就如常工作了,這裡是一些使用例子。ACL 功能使得 shadowsocks-libev 能對接受的請求按照一定的規則進行直連或代理。內置分流是如何實現的呢?實際上,shadowsocks-libev 還內置了一個異步 DNS client,並允許用戶將系統的 SOCKS5 代理設置為 shadowsocks-libev。這樣,shadowsocks-libev 便幾乎全局接管了系統流量,當 shadowsocks-libev 接收到一個域名時候,首先會對 ACL 列表中的條目進行正則匹配,如果沒有結果,則利用自帶的 DNS client 進行解析,得到 IP 之後再次匹配。就這樣,shadowsocks-libev 把本來在瀏覽器解析 PAC 的功能移動到 shadowsocks-libev 內部,解決了 PAC 分流在不同應用間行為不一致的問題。更重要的是,當域名解析為 IP,並且根據 ACL 規則觸發代理時,shadowsocks-libev 會將域名,而不是 IP 交給 ss-server,就這樣優雅地解決了DNS污染和CDN解析不是最優的問題。
分流代理在內建 DNS Client這件事上,shadowsocks-libev 並不是唯一一個,V2Ray 和 Surge 還有 Clash均是內建了 DNS Client。特別是 Clash 支持部署在 Linux 系統,利用系統的 Netfilter 功能實現對 OUTPUT 鏈和 NAT 鏈上的 TCP 包進行代理,讓我們在 OpenWrt 路由器,部署代理又多了一種新選擇。
shadowsocks-libev版有一个ss-tunnel工具,可以把远端主机(比如8.8.8.8)的端口(比如53)转发到本地的端口(比如53)。如果把8.8.8.8的53端口转发到本地的53端口,那么相当于开通了一个走shadowsocks-libev协议的DNS代理。 在mac上,安装 shadowsocks-libev:brew install shadowsocks-libev 此命令会生成2个可执行文件:ss-local和ss-tunnel. 运行ss-tunnel -h 会显示: ... [-u] Enable UDP relay. ... [-L :] Destination server address and port for local port forwarding.
xfrp is xfrps client implemented by c for OpenWRT and LEDE system The motivation to start xfrp project is that we are OpenWRTer, and openwrt usually ran in device which has little ROM and RAM space, however golang always need more space and memory; therefore we start xfrp project.
Compile
xfrp need libeventopenssl-dev and json-c support Before compile xfrp, please install libeventopenssl-dev and json-c in your system.
git clone https://github.com/KunTengRom/xfrp.git cd xfrp cmake . make
Quick start
before using xfrp, you should have built the proxy server: xfrps, It's no difference with frp at usage, but support FTP and more embedded-client-friendly for linux. Run in debug mode :
xfrpc -c frpc_mini.ini -f -d 7
Run in release mode :
xfrpc -c frpc_mini.ini -d 0
FTP support
xfrp support ftp proxy after version 0.07.451. Hypothesize you have built xfrps succeed! Configure ftp in frpc.ini
remote_port is the reporxy port of FTP command tunnel, and remote_data_port is FTP-DATA port reporxy. Use -p (PASV Mode) of ftp command to connect to proxy ftp server:
ftp -p 111.112.113.114 30621
In Master version server_addr can use domain name intead of IP address in FTP proxy. Issue #4 and Issue #5.
from https://github.com/KunTengRom/xfrp ------
xfrps forks from https://github.com/fatedier/frp but mainly use its server side feature and cooperate with xfrp.
What is xfrps and why xfrps
xfrps was xfrp's server, it was a branch of frp which mainly focus on serving amount of routers and IOT devices The reason to start xfrps project is the following: 1, we need a stable frp server to serve our xfrp, however frp change very fast, high version of frp doesn't promise compatible with low version 2, frp's roadmap doesn't satisfy xfrp's need, for example, ftp support is important for us, but frp didn't support it 3, by maintaining our own frp server project, we can develope our own feature, no need to wait frp's support
Difference between xfrps and frp
xfrps start from v0.11.0 of frp, the following is difference:
xfrps need client provide runid, if not, it will reject it.
xfrps support only one tcp&ftp proxy for every client, and xfrps'client don't need to provide its remote port, xfrps will choose one for it
client can use its runid to get its tcp&ftp proxy's remote port by http request for example curl http://xfrps_domains:7500/api/port/tcp/getport/your_runid
xfrps support ftp
in order to use ftp proxy, u need add the following content to config file
type = ftp local_ip = your ftp server ip local_port = 21
to get ftp remote port, using the following http request: curl http://xfrps_domains:7500/api/port/tcp/getftpport/your_runid