博文

目前显示的是 二月, 2019的博文

How to solve docker-deamon connection failed error after updating the kernel

Please make sure linux-image-extra-$(your version) is installed and that version is enabled as your active kernel.

Shadowsocks client (SS客户端/SSR客户端) for windows/mac/android/linux/ios

Shadowsocks 服务推荐: Just My Socks 推荐理由:价格便宜,支持月付,安全灵活。 Windows Latest:  https://github.com/shadowsocks/shadowsocks-windows/releases Local:  https://geekblog.mybluemix.net/wp-content/uploads/files/Shadowsocks-4.1.4-windows.zip Mac Latest:  https://github.com/shadowsocks/ShadowsocksX-NG/releases Local:  https://geekblog.mybluemix.net/wp-content/uploads/files/ShadowsocksX-NG.app.1.8.2.zip Android Latest:  https://github.com/shadowsocks/shadowsocks-android/releases Local:  https://geekblog.mybluemix.net/wp-content/uploads/files/shadowsocks-android.zip Linux Latest:  https://github.com/shadowsocks/shadowsocks-qt5/wiki/Installation IOS 可以通过AppStore使用收费版本SuperWingy, ShadowBroken 或者通过PP助手下载shadowrocket

Openwrt settings for ipv6

Environment: internet      | Netgear R6250      |                                                                                  | Netgear WNDR4300 (OpenWRT)                                        PCs      | PCs R6250 Configurations: Just put everything to auto and enable ipv6 in advanced settings of the web management page. WNDR4300 Configurations: Interface 'lan' : in ipv6 settings, set ra (Router Advertisement-Service) to 'relay', DHCPv6-Service to 'relay', NDP-proxy to 'hybrid' clear ULA-prefix in 'Interfaces' page modify /etc/config/dhcp: config dhcp 'wan' option interface 'wan' option ignore '1' NEW: option ra 'relay' NEW: option dhcpv6 'relay' NEW: option ndp 'relay' NEW: option master '1' reboot

Mysql create a remote user

my.cnf (my.ini on windows) # Replace xxx with your IP Address bind-address = xxx . xxx . xxx . xxx then CREATE USER 'myuser' @ 'localhost' IDENTIFIED BY 'mypass' ; CREATE USER 'myuser' @ '%' IDENTIFIED BY 'mypass' ; Then GRANT ALL ON *.* TO 'myuser' @ 'localhost' ; GRANT ALL ON *.* TO 'myuser' @ '%' ;

About IPv6

Stateful DHCPv6  auto-configuration of IPv6 is the equivalent of DHCP in IPv4. A DHCPv6 service provides the IPv6 address to the client device and both client and server maintain the "state" of that address (i.e. lease time, etc). The router in its router advertisement message will tell the newly come-up host to ask for all address (global address, DNS address, SIP proxy server address) from the DHCPv6 server. Stateless DHCPv6  is for the auto-configuration by the client device of its IPv6 address and routing based on the router advertisements. The router tells the newly come-up host to take only the extra information like DNS, SIP proxy server address from the DHCPv6 server, while the global address is given to the host by the prefix present in the router advertisement message. The router gives the prefix of 64 bits and the host uses its MAC address (48 bits) converted in  EUI-64  method to obtain a global IPv6 address. In detail, from the article  What is the differenc

Create ubifs volumes in Linux (OpenWRT)

When using a router flashed with OpenWRT, you may find that the capacity of the filesystem is much smaller than the real capacity. For example, the router I use is Netgear WNDR4300 which has a 128MB Nand flash. But when using the 'df -h' command to inspect the space usage status, I surprisingly found that the space of the total mounting point '/' is only 14MB. So to find out the reason and try to expand usable space, I used the command "dmesg" and "cat /proc/mtd" to collect the information of mtd devices. [     0.634792] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1 [     0.641287] nand: Micron NAND 128MiB 3,3V 8-bit [     0.645888] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [     0.653625] Scanning device for bad blocks [     0.661590] random: fast init done [     0.744785] 12 cmdlinepart partitions found on MTD device ar934x-nfc [     0.751249] Creating 12 MTD partitions on "ar934x-nfc&

Configure shadowsocks transparent proxy + gfwlist(PAC) on OpenWRT Router

You must have Shadowsocks services which can be gained in the following way before actually starting to configure. Purchase Shadowsocks Service directly online. Recommendation:  Just My Socks Quick Shadowsocks configuration using Just My Socks, please click here . Build the service yourself. Please refer to  Configure V2Ray(Shadowsocks mode) + 加速:普通BBR/魔改BBR on KVM VPS (Tested on Ubuntu 16.04) . The environment this article used, FYI: OpenWrt 18.06.1/LuCI openwrt-18.06 The Overall Idea: DNS part: if the requested address is in gfwlist     forward DNS request to 127.0.0.1:5353 which is listened by dns-forwarder     dns-forwarder forwards the request to 8.8.8.8 for translating     8.8.8.8 is in gfwlist, so match iptables rules and is fowared to 1080     ss-redir listen on port 1080, foward request to shadowsocks server else     use public DNS servers or the DNS servers provided by the ISP other data: if the requested address is in gfwlist     match ipt

一份可用的haproxy配置,ss-in,ss-out

global   log 127.0.0.1   local0           #[日志输出配置,所有日志都记录在本机,通过local0输出]   log 127.0.0.1   local1 notice    #定义haproxy 日志级别[error warringinfo debug]   daemon                        #以后台形式运行harpoxy   nbproc 1                         #设置进程数量   pidfile /home/alex/haproxy.pid   ulimit-n 51200                   #ulimit 的数量限制   maxconn 8192                    #默认最大连接数,需考虑ulimit-n限制   #chroot /usr/local/haproxy defaults   log global   mode tcp                  #默认的模式mode { tcp|http|health },tcp是4层,http是7层,health只会返回OK   retries 3                 #两次连接失败就认为是服务器不可用,也可以通过后面设置   option abortonclose       #当服务器负载很高的时候,自动结束掉当前队列处理比较久的链接   option redispatch   maxconn 8192              #默认的最大连接数   timeout connect  5000ms   #连接超时   timeout client 30000ms    #客户端超时   timeout server 30000ms    #服务器超时   balance roundrobin        #设置默认负载均衡方式,轮询方式   #balance source           #设置默认负载均衡方式,类似于nginx的ip_hash   #balnace leastconn        #设置默认负载均衡方式,最小连接数 listen admin_stats   bind *:111

Openwrt路由器上配置shadowsocks透明代理+gfwlist(PAC)

Shadowsocks 服务推荐: Just My Socks 推荐理由:价格便宜,支持月付,安全灵活。 本文配置的前提是已经有shadowsocks服务。你可以通过购买或者自行搭建的方式获得。以下是链接: 直接购买网上的服务,此处推荐 Just My Socks 快速Just My Socks配置Shadowsocks,请点 这里 。 自行搭建,请参考 KVM VPS上配置V2Ray(Shadowsocks mode) + 加速:普通BBR/魔改BBR(测试于Ubuntu 16.04) 本文所使用的环境,仅作参考: OpenWrt 18.06.1/LuCI openwrt-18.06 整体思路: DNS部分: if 访问地址在gfwlist中     DNS请求转发到127.0.0.1:5353的dns-forwarder的监听端口     dns-forwarder转发到8.8.8.8进行解析     8.8.8.8在gfwlist中,通过匹配iptables规则转发到1080端口     ss-redir监听1080端口,通过shadowsocks代理服务器转发请求 else     正常使用公共DNS或者ISP提供的DNS服务器 其他数据: if 访问地址在gfwlist中     通过匹配iptables规则转发到1080端口     ss-redir监听1080端口,通过shadowsocks代理服务器转发请求 else     正常访问 步骤1:依赖包安装( 非常重要 ) 本文所有的操作都基于SSH和Web管理界面操作。 首先通过SSH添加GPG Key,这样之后添加的源才能通过签名验证: wget http://openwrt-dist.sourceforge.net/packages/openwrt-dist.pub -O /tmp/openwrt-dist.pub opkg-key add /tmp/openwrt-dist.pub 然后在OpenWRT Web管理界面,“系统”>“软件包”>“配置”中,“自定义feeds”最后添加两行源: src/gz openwrt_dist http://openwrt-