Skip to content

Instantly share code, notes, and snippets.

View madeye's full-sized avatar
🚩
Hiring chip architect at NVIDIA Shanghai office.

Max Lv madeye

🚩
Hiring chip architect at NVIDIA Shanghai office.
View GitHub Profile
@madeye
madeye / WifiProxyManager.java
Created December 21, 2012 12:22
Set Wifi Proxy for Android
package me.madeye;
import android.content.Context;
import android.net.ProxyProperties;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiManager;
import android.os.Handler;
import android.util.Log;
import java.util.List;
@madeye
madeye / ProxySettings.java
Created April 4, 2012 01:53
Set proxy for Android Webview
package me.madeye;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.apache.http.HttpHost;
import android.content.Context;
@madeye
madeye / iperf.sh
Created February 3, 2017 01:29
Bandwidth test for shadowsocks
#!/bin/bash
method=$1
ss-tunnel -k test -m $method -l 8387 -L 127.0.0.1:8388 -s 127.0.0.1 -p 8389 &
ss_tunnel_pid=$!
ss-server -k test -m $method -s 127.0.0.1 -p 8389 &
ss_server_pid=$!
iperf -s -p 8388 &
@madeye
madeye / setup.sh
Last active November 27, 2021 00:45
shadowsocks-setup.sh
#/bin/bash +x
if [ $# -ne 1 ]
then
echo "Usage: `basename $0` [password]"
exit 21
fi
PASSWORD=$1
@madeye
madeye / example.json
Last active March 16, 2020 05:36
example.json
[
{
"server": "198.199.101.152",
"server_port": 8388,
"password": "u1rRWTssNv0p",
"method": "aes-256-cfb",
"remarks": "Example 1"
},
{
"server": "198.199.101.12",
{
"version": 1,
"remark": "Some server",
"servers": [
{
"id": "1a2b3c4d",
"remark": "Server A",
"server": "example.com",
"server_port": 1234,
"password": "example",
@madeye
madeye / privacy_policy.md
Created December 9, 2019 01:46
Privacy Policy

Privacy Policy

Tangcha Inc. built the 唐茶 app as a Free app. This SERVICE is provided by Tangcha Inc. at no cost and is intended for use as is.

This page is used to inform visitors regarding our policies with the collection, use, and disclosure of Personal Information if anyone decided to use our Service.

If you choose to use our Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that we collect is used for providing and improving the Service. We will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at 唐茶 unless otherwise defined in this Privacy Policy.

@madeye
madeye / sysctl.conf
Last active June 5, 2018 11:05
Optimized sysctl.conf for shadowsocks
net.core.wmem_max = 12582912
net.core.rmem_max = 12582912
net.ipv4.tcp_rmem = 10240 87380 12582912
net.ipv4.tcp_wmem = 10240 87380 12582912
net.ipv4.ip_local_port_range = 18000 65535
net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_max_syn_backlog = 3240000
net.core.somaxconn = 3240000
net.ipv4.tcp_max_tw_buckets = 1440000
[proxy_all]
[outbound_block_list]
(^|\.)\w*admarvel\w*\..*$
(^|\.)\w*admaster\w*\..*$
(^|\.)\w*adsage\w*\..*$
(^|\.)\w*adsensor\w*\..*$
(^|\.)\w*adsh\w*\..*$
(^|\.)\w*adsmogo\w*\..*$
@madeye
madeye / gist:7180178
Created October 27, 2013 10:32
Build log
make[1]: Entering directory `/home/max/openwrt/trunk'
make[2]: Entering directory `/home/max/openwrt/trunk/package/libs/toolchain'
if [ -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libc" >> /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install
if [ -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean ]; then rm -f /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.9.33.2/pkginfo/toolchain.default.install.clean; fi; echo "libgcc" >> /home/max/openwrt/trunk/staging_dir/target-mips_34kc_uClibc-0.