Skip to content

Instantly share code, notes, and snippets.

View liantian-cn's full-sized avatar
💬
I may be slow to respond.

liantian liantian-cn

💬
I may be slow to respond.
View GitHub Profile
@messense
messense / shadowsocks-on-openwrt.md
Last active June 8, 2023 07:49
shadowsocks on openwrt

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

@plentz
plentz / nginx.conf
Last active November 14, 2024 08:35
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@sourceperl
sourceperl / th_pinger.py
Last active April 12, 2024 18:56
Python script for do multi-threaded ping
#!/usr/bin/env python
# ping a list of host with threads for increase speed
# use standard linux /bin/ping utility
from threading import Thread
import subprocess
try:
import queue
except ImportError:
import Queue as queue
@fqrouter
fqrouter / readme.txt
Last active May 11, 2024 03:22
shadowsocks 公共代理的必要设置
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下
@guillaumevincent
guillaumevincent / README.md
Last active October 14, 2024 02:25
Windows Service with Python 3.5 and pyinstaller

1、vim /etc/sysctl.conf

2、末尾追加如上设置

# 提高整个系统的文件限制
# max open files
fs.file-max = 51200

# max read buffer
net.core.rmem_max = 67108864
@notsure2
notsure2 / build-qbittorrent-ubuntu-16.04-static.sh
Last active July 3, 2021 12:23
How to compile latest qBittorrent-nox with static qt, boost and openssl for Ubuntu 16.04 xenial (using Ubuntu 16.04 xenial)
#!/bin/bash
set -e
apt update -y
apt install -y build-essential git perl python2.7 python2.7-dev zlib1g-dev autoconf libicu-dev pkg-config perl ccache
OPENSSL_TAG=OpenSSL_1_1_1-stable
QBITTORRENT_TAG=v4_2_x
LIBTORRENT_TAG=RC_1_2
QT5_TAG=5.14
BOOST_VER=1.72.0