Skip to content

Instantly share code, notes, and snippets.

View yhvhnl's full-sized avatar

elim yhvhnl

  • nec
  • Hokkaido, Furano, Japan
View GitHub Profile
@yhvhnl
yhvhnl / gfwlist.privoxy.sh
Created May 1, 2024 13:20 — forked from Gabirel/gfwlist.privoxy.sh
让 privoxy 代理服务器使用 gfwlist 自动分流
#!/bin/bash -x
## 让 privoxy 代理服务器使用 gfwlist 自动分流
## 安装需要的包,gfwlist2privoxy 暂时只支持 py2.7 所以需要修改下::
# sudo apt install -y privoxy python-pip
# pip install --user gfwlist2privoxy
# sed -i 's,^#!/usr/bin/python.*,#!/usr/bin/python2.7,' ~/.local/bin/gfwlist2privoxy
## 修改 privoxy 配置,默认使用 8123 本地端口
grep -q gfwlist.action /etc/privoxy/config || echo 'actionsfile gfwlist.action' | sudo tee -a /etc/privoxy/config
@yhvhnl
yhvhnl / scan_isp_blocklist.sh
Created April 11, 2024 12:27 — forked from vfreex/scan_isp_blocklist.sh
Test which TCP ports are blocked by my ISP
#!/bin/bash
for port in {1..9999}; do
echo -n "TCP $port: "
result=$(nc "$1" "$port" -w 1 2>&1 < /dev/null)
if [ "$?" -eq 0 ]; then
echo "Open"
continue
fi
if [[ "$result" == *refused* ]]; then
@yhvhnl
yhvhnl / ocserv-cent-os-7.sh
Created March 26, 2024 05:47 — forked from fireblue/ocserv-cent-os-7.sh
ocserv(Cisco AnyConnect 兼容服务端) 一键安装脚本 for CentOS 7
#!/bin/bash
####################################################
# #
# This is a ocserv installation for CentOS 7 #
# Version: 1.1.1 20140803 #
# Author: Travis Lee #
# Website: http://www.stunnel.info #
# #
####################################################
@yhvhnl
yhvhnl / theme.xml
Created October 26, 2019 03:38 — forked from xivid/theme.xml
A Minimalist Blogger Theme
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<meta charset='UTF-8'/>
<meta content='width=device-width' name='viewport'/>
<b:include data='blog' name='all-head-content'/>
<link href='//fonts.googleapis.com/css?family=Merriweather%3A300%2C400%2C700' media='all' rel='stylesheet' type='text/css'/>
<link href='//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' rel='stylesheet'/>
@yhvhnl
yhvhnl / README.MD
Created June 10, 2018 15:13 — forked from ihciah/README.MD
科学搭建国内VPN转发服务器(国内VPN中转)

科学搭建国内VPN转发服务器

简介

  • 简单拓扑结构:国内-(ocserv)-国内中转服务器-(shadowvpn)-国外服务器
  • 实验环境:用户终端为iPhone,中转服务器及国外服务器均为Ubuntu 14.04

搭建过程

  • 搭建Ocserv
    • 打开ftp://ftp.infradead.org/pub/ocserv/找到最新版本并下载、解压
    • 安装依赖: