This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
using Topshelf; | |
namespace CowService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"os" | |
"os/signal" | |
"syscall" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |