#关于 PAC 的书签夹
###比较全的 PAC 介绍
- http://www.proxypacfiles.com/proxypac/ 入门必看(英文)
- http://findproxyforurl.com/ 跟上面的类似(英文)
- http://wordpress0.com/2011/06/write-pac-file/ (汉语)内容比较全(尤其是附录)
- 代理自动配置 维基百科
- https://calomel.org/proxy_auto_config.html Calomel写的的实用性介绍
| # 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf | |
| # 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备 | |
| # Version 2.0 | |
| [General] | |
| # 日志等级: warning, notify, info, verbose (默认值: notify) | |
| loglevel = notify | |
| # 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS | |
| # 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理 | |
| # 设置中.) |
| # 你可以从该 URL 下载这个配置文件: http://surge.run/config-example/ios.conf | |
| # 用编辑器编辑后,再通过 iTunes, URL, AirDrop 或者 iCloud Drive 复制回 iOS 设备 | |
| # Version 2.0 | |
| [General] | |
| # 日志等级: warning, notify, info, verbose (默认值: notify) | |
| loglevel = notify | |
| # 跳过某个域名或者 IP 段,这些目标主机将不会由 Surge Proxy 处理。(在 macOS | |
| # 版本中,如果启用了 Set as System Proxy, 那么这些值会被写入到系统网络代理 | |
| # 设置中.) |
| _complete_hosts () { | |
| COMPREPLY=() | |
| cur="${COMP_WORDS[COMP_CWORD]}" | |
| host_list=`{ | |
| for c in ~/.ssh/config | |
| do [ -r $c ] && sed -n -e 's/^[[:space:]]*Host[[:space:]]//p' $c | |
| done | |
| } | tr ' ' '\n'|grep -v '*'` | |
| COMPREPLY=( $(compgen -W "${host_list}" -- $cur)) | |
| return 0 |
| #!/usr/bin/env python | |
| #coding=utf-8 | |
| # | |
| # Generate a list of dnsmasq rules with ipset for gfwlist | |
| # | |
| # Copyright (C) 2014 http://www.shuyz.com | |
| # Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules | |
| import urllib2 | |
| import re |
| #!/usr/bin/env bash | |
| set -e | |
| tmpdir=$(mktemp -t -d advcp.XXXXXX) | |
| cd ${tmpdir} | |
| wget https://aur.archlinux.org/packages/ad/advcp/advcp.tar.gz | |
| tar xf advcp.tar.gz | |
| source advcp/PKGBUILD |
| #!/bin/bash | |
| ## FORSTWOOF UBUNTU PRESEED :: BUILD SCRIPT | |
| # Quit on first error | |
| set -e | |
| # Temporary directory for the build | |
| TMP="/var/tmp/ubuntu-build" |
| good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。 | |
| 但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能) | |
| 本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考 | |
| https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks | |
| 1、 shadowsocks的timeout设置 | |
| 超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。 | |
| 2、 检查操作系统的各种限制 | |
| 对于openvz的vps,特别需要检查一下 |
| # alias to edit commit messages without using rebase interactive | |
| # example: git reword commithash message | |
| reword = "!f() {\n GIT_SEQUENCE_EDITOR=\"sed -i 1s/^pick/reword/\" GIT_EDITOR=\"printf \\\"%s\\n\\\" \\\"$2\\\" >\" git rebase -i \"$1^\";\n git push -f;\n}; f" | |
| # delete all repos in an org | |
| gh repo list YOUR_ORG_NAME --limit 4000 --json nameWithOwner --jq '.[].nameWithOwner' | xargs -I {} gh repo delete {} --yes | |
| # delete all forks in an org | |
| gh repo list YOUR_ORG_NAME --limit 4000 --json nameWithOwner,isFork --jq '.[] | select(.isFork) | .nameWithOwner' | xargs -I {} gh repo delete {} --yes |
#关于 PAC 的书签夹
###比较全的 PAC 介绍
| #!/usr/bin/python | |
| # | |
| # This is a python script. You need a Python interpreter to run it. | |
| # For example, ActiveState Python, which exists for windows. | |
| # | |
| # This script strips the penultimate record from a Mobipocket file. | |
| # This is useful because the current KindleGen add a compressed copy | |
| # of the source files used in this record, making the ebook produced | |
| # about twice as big as it needs to be. | |
| # |