Skip to content

Instantly share code, notes, and snippets.

View bigtan's full-sized avatar

tanlei678 bigtan

View GitHub Profile
@bigtan
bigtan / obfs.service
Created September 17, 2017 03:27
shadowsocks.service
[Unit]
Description=Shadowsocks Server
After=network.target
[Service]
ExecStart=/usr/local/bin/obfs-server -s 0.0.0.0 -p 4001 --obfs http -r 127.0.0.1:4000
User=nobody
Group=nogroup
[Install]
@bigtan
bigtan / compile.sh
Last active November 10, 2023 15:31
shadowsocks-libev static build
apt-get update && apt-get install build-essential automake autoconf libtool git clang -y && export CC=clang
ver=2.16.3
wget --no-check-certificate https://tls.mbed.org/download/mbedtls-$ver-gpl.tgz
tar zxf mbedtls-$ver-gpl.tgz
cd mbedtls-$ver
sed -i "s/DESTDIR=\/usr\/local/DESTDIR=\/projects\/dists\/mbedtls/g" Makefile
LDFLAGS=-static WINDOWS_BUILD=1 make -j`nproc` install
cd ..
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using Topshelf;
namespace CowService
@bigtan
bigtan / ss.go
Last active October 4, 2018 12:22
ss.go
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"os/signal"
"syscall"
"time"
@bigtan
bigtan / RepeatTimer.py
Created February 2, 2016 03:00
A Python RepeatTimer in standard library style.
class RepeatTimer(Thread):
def __init__(self, interval, function, *args, **kwargs):
Thread.__init__(self)
self.interval = interval
self.function = function
self.args = args
self.kwargs = kwargs
self.finished = Event()
def cancel(self):