使用Openwrt作为主路由,另一台Ubuntu 18.04主机上使用Docker运行Clash来作为网关进行转发,以达到按规则智能翻墙的目的。也是很多人提到的“旁路由”方法。
注:Openwrt可以直接编译OpenClash,我这次只是纯粹为了折腾而折腾。
| {"lastUpload":"2019-11-27T02:06:23.362Z","extensionVersion":"v3.4.3"} |
| # Required | |
| # > PUID & PGID | |
| CLOUDREVE_PUID=0 | |
| CLOUDREVE_PGID=0 | |
| # > Aria2 | |
| ARIA2_RPC_SECRET=&1%2Kdf3%piY$ | |
| # Optional |
| # | |
| # Automatically generated file; DO NOT EDIT. | |
| # OpenWrt Configuration | |
| # | |
| CONFIG_MODULES=y | |
| CONFIG_HAVE_DOT_CONFIG=y | |
| # CONFIG_TARGET_sunxi is not set | |
| # CONFIG_TARGET_apm821xx is not set | |
| # CONFIG_TARGET_ath25 is not set | |
| # CONFIG_TARGET_ath79 is not set |
This article describe how to use DoH with Openwrt. Using dnscrypt-proxy 2 as up-stream DNS server and dnsmasq forward all the DNS queries to dnscrypt-proxy 2.
I do prefer to complie packages directly into Openwrt. If you prefer to install by opkg please switch to openwrt's original software feeds.
| import json | |
| from urllib.parse import urlparse | |
| import tldextract | |
| def extract_urls(har_file_path, url_file_path, domain_txt_file_path, suffix_txt_file_path): | |
| with open(har_file_path, 'r', encoding='utf-8') as f: | |
| har_data = json.load(f) | |
| urls = [] |
| import os | |
| import zipfile | |
| def extract_heic_from_livp(root_dir): | |
| processed_files = 0 | |
| error_count = 0 | |
| for foldername, subfolders, filenames in os.walk(root_dir): | |
| for filename in filenames: |