dnsmasq的配置文件由/etc/config/dhcp
决定
####禁用 dnsmasq 的 DNS 功能
在该文件 config dnsmasq
下添加
option port 54
如果你的 WAN 口是 PPPOE 等方式连接,而且系统日志中有
DHCP packet received on eth0.2 which has no address
就再添加
#!/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:
package main | |
import ( | |
"net" | |
"os/exec" | |
"github.com/k0kubun/pp" | |
) | |
func Hosts(cidr string) ([]string, error) { |
package main | |
import ( | |
"context" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" | |
"time" | |
) |
#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" |
package main | |
import ( | |
"crypto" | |
"crypto/rsa" | |
"crypto/sha1" | |
"crypto/x509" | |
"encoding/base64" | |
"fmt" | |
) |