dnsmasq的配置文件由/etc/config/dhcp决定
####禁用 dnsmasq 的 DNS 功能
在该文件 config dnsmasq下添加
option port 54
如果你的 WAN 口是 PPPOE 等方式连接,而且系统日志中有
DHCP packet received on eth0.2 which has no address
就再添加
| func printStruct(i interface{}) { | |
| s := reflect.ValueOf(i).Elem() | |
| typeOfT := s.Type() | |
| for i := 0; i < s.NumField(); i++ { | |
| f := s.Field(i) | |
| fmt.Printf("%d: %s %s = %v\n", i, | |
| typeOfT.Field(i).Name, f.Type(), f.Interface()) | |
| } | |
| } |
| package timemilli | |
| import "time" | |
| const millisInSecond = 1000 | |
| const nsInSecond = 1000000 | |
| // Converts Unix Epoch from milliseconds to time.Time | |
| func FromUnixMilli(ms int64) time.Time { | |
| return time.Unix(ms/int64(millisInSecond), (ms%int64(millisInSecond))*int64(nsInSecond)) |
| #!/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
就再添加
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
[TODO: act is a thing you want so you can be awesome]
We'll also add the following helpful plugins:
| import ( | |
| "encoding/json" | |
| "github.com/graph-gophers/graphql-go" | |
| "github.com/graph-gophers/graphql-go/errors" | |
| ) | |
| type ErrorType string | |
| type Error struct { |
| import ( | |
| "context" | |
| "crypto/tls" | |
| "log" | |
| "net/http" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| "time" |