任意选择一个基础镜像,从 https://github.com/shadowsocks/shadowsocks-libev 下载源码,编译成可以执行文件。
通过环境变量指定密码、加密方式,暴露服务端口。
用 ENTRYPOINT
指定 ss-server
的可执行文件,这样 docker run
的时候可以附加自定义参数。
可以自己加一些其他的实用功能。
完成之后提交你的 Dockerfile
到 [email protected]。
# config | |
username = '' # your username used to login | |
user_id = int() # should be a integer | |
courseId = '' | |
cookie_xsid = '' # find it in your browser after logging in | |
finish_time = '' # e.g. 20181222 | |
parentId = '' | |
import socket | |
import config_pb2 | |
geoiplist = config_pb2.GeoIPList() | |
geoip = geoiplist.entry.add() | |
geoip.country_code = 'CN' | |
for l in open('china_ip_list.txt', 'r').readlines(): | |
l = l.strip() | |
network, prefix = l.split('/') |
// ==UserScript== | |
// @name Torrentz2 magnet link generator | |
// @namespace qnnnnez's namespace | |
// @version 0.1 | |
// @description Generate magnet link from infohash and tracker list. | |
// @author qnnnnez | |
// @match https://torrentz2.eu/* | |
// @exclude https://torrentz2.eu | |
// @exclude https://torrentz2.eu/ | |
// @exclude https://torrentz2.eu/search?* |
任意选择一个基础镜像,从 https://github.com/shadowsocks/shadowsocks-libev 下载源码,编译成可以执行文件。
通过环境变量指定密码、加密方式,暴露服务端口。
用 ENTRYPOINT
指定 ss-server
的可执行文件,这样 docker run
的时候可以附加自定义参数。
可以自己加一些其他的实用功能。
完成之后提交你的 Dockerfile
到 [email protected]。
def foo(first, middle): | |
assert len(first) == len(middle) and set(first) == set(middle) | |
if len(first) == 0: | |
return None | |
if len(first) == 1: | |
return (first[0],) | |
root = first[0] | |
root_pos = middle.index(root) | |
middle_left = middle[:root_pos] | |
middle_right = middle[root_pos+1:] |
#include <memory> | |
#include <functional> | |
#include <queue> | |
#include <iostream> | |
#include <boost/asio.hpp> | |
using boost::system::error_code; | |
using boost::asio::ip::tcp; | |
using boost::asio::mutable_buffer; |
#!/usr/bin/env python3 | |
LISTEN_PORT = 10086 | |
import tornado.ioloop | |
import tornado.web | |
import os | |
import socket | |
import struct |
from sys import stdin, stdout | |
domains = set() | |
for line in stdin: | |
line = line.strip() | |
if line.startswith('.'): | |
line = line[1:] |
#!/bin/bash -e | |
remote="$1@$2" | |
echo -ne '\e]0;wait... '"$remote"'\a' | |
eval $(/usr/bin/ssh-pageant -r -a "/tmp/.ssh-pageant-$USERNAME") | |
localdir="$(cygpath -u "$APPDATA")/gnupg" | |
extrasock="$localdir/S.gpg-agent.extra" # file containing "PORT\nNONCE" | |
rdir='$HOME/.gnupg' # remote prefix | |
rinsock="$rdir/S.gpg-agent" # listen on this socket on server |
import asyncio | |
import socket | |
import struct | |
SO_ORIGINAL_DST = 80 | |
class NATCPServerProtocol(asyncio.Protocol): | |
def connection_made(self, transport): |