This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Desc: convert gfwlist.txt into dnsmasq.conf | |
# Dependency: base64, curl(https support), perl5 v5.10.0+ | |
# Usage: bash gfwlist2dnsmasq [-s <addr>] [-p <port>] [-n <name>] [-l] | |
# -s <addr> dns server addr for resolve gfwlist domain. (default: 127.0.0.1) | |
# -p <port> dns server port for resolve gfwlist domain. (default: 60053) | |
# -n <name> which ipset will be saved the IP. (resolved from gfwlist domain) | |
# if this option is not set, the ipset rule will not be generated. | |
# -l generate gfwlist domain list instead of dnsmasq conf. |