Skip to content

Instantly share code, notes, and snippets.

View sanae10001's full-sized avatar

sanae10001 sanae10001

  • Sloan Great Wall
View GitHub Profile
@sanae10001
sanae10001 / iperf.sh
Created November 25, 2019 02:34 — forked from madeye/iperf.sh
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 &

dnsmasq的配置文件由/etc/config/dhcp决定 ####禁用 dnsmasq 的 DNS 功能 在该文件 config dnsmasq下添加

option port 54

如果你的 WAN 口是 PPPOE 等方式连接,而且系统日志中有 DHCP packet received on eth0.2 which has no address 就再添加

@sanae10001
sanae10001 / 1-redsocks2-openwrt.md
Created July 12, 2019 07:48 — forked from lanceliao/1-redsocks2-openwrt.md
在OpenWrt上配置redsocks2

redsocks2是一款透明socks5代理工具,能够实现智能代理的功能,这里是redsocks2在OpenWrt上的配置,配合shadowsocks使用。

redsocks.conf 是配置文件,放在/etc目录,将192.168.1.1改成路由器的地址. redsocks2.sh 为自启动文件,改名为redsocks2放到/etc/init.d目录即可。自启动文件假设redsocks可执行文件在/opt/bin目录。

启动redsocks2: /etc/init.d/redsocks2 start 停止redsocks2: /etc/init.d/redsocks2 stop

redsocks2 git源

@sanae10001
sanae10001 / act-setup.md
Created January 9, 2019 19:37 — forked from TomRichter/OnWipe.xml
Installation Instructions for FFXIV ACT + Key Plugins

FFXIV ACT Installation Instructions

[TODO: act is a thing you want so you can be awesome]

We'll also add the following helpful plugins:

  • OverlayPlugin - Adds overlay support to conveniently display information in game.
  • Kagerou - A nice DPS overlay that's customizable via an easy-to-use control panel.
  • Triggernometry - Advanced custom triggers with better organization.
@sanae10001
sanae10001 / go-os-arch.md
Created June 29, 2018 02:34 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.8.3 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • android
  • darwin
@sanae10001
sanae10001 / curl.md
Created May 29, 2018 09:33 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@sanae10001
sanae10001 / ipcalc.go
Created November 2, 2017 07:12 — forked from kotakanbe/ipcalc.go
get all IP address from CIDR in golang
package main
import (
"net"
"os/exec"
"github.com/k0kubun/pp"
)
func Hosts(cidr string) ([]string, error) {
@sanae10001
sanae10001 / graceful.go
Created November 1, 2017 06:54 — forked from peterhellberg/graceful.go
*http.Server in Go 1.8 supports graceful shutdown. This is a small example.
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
)
@sanae10001
sanae10001 / gist:fa908fda6420b6c90567e202ae19cc42
Created October 25, 2017 10:48 — forked from bringhurst/gist:1693075
How to create a tun in osx without installing 3rd party crap
#include <netinet/in.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/kern_control.h>
#include <sys/ioctl.h>
#include <sys/sys_domain.h>
#include <sys/kern_event.h>
#include <sys/errno.h>
#define UTUN_CONTROL_NAME "com.apple.net.utun_control"
@sanae10001
sanae10001 / verify.go
Created May 5, 2017 07:42 — forked from jedy/verify.go
use publib key to verify in golang
package main
import (
"crypto"
"crypto/rsa"
"crypto/sha1"
"crypto/x509"
"encoding/base64"
"fmt"
)