diff options
author | Adi Prasetya | 2022-03-17 14:05:04 +0700 |
---|---|---|
committer | Adi Prasetya | 2022-03-17 14:05:04 +0700 |
commit | 428f5a945d4968177b835c892bd217db6e9c9326 (patch) | |
tree | ef374dc01e1ae3b7e3f140cc686bc9ef44530ac5 | |
parent | 6ab9c59171cda884af15a8b0fb0138c1cd7954e0 (diff) | |
download | aur-428f5a945d4968177b835c892bd217db6e9c9326.tar.gz |
add example config
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | config.yaml | 66 |
4 files changed, 76 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = clash-meta-bin pkgdesc = Clash Meta binary provided by MetaCubeX pkgver = v1.9.0 - pkgrel = 3 + pkgrel = 4 url = https://github.com/MetaCubeX/Clash.Meta/releases install = clash-meta-bin.install arch = x86_64 @@ -16,9 +16,11 @@ pkgbase = clash-meta-bin source = clash@.service source = clash_user.service source = clash.service + source = config.yaml sha512sums = 3d4b599a972caab7238f405d57e8ec74f9d0f51bc2b51f6656305f3a46aecd4d1d5c10a16415c3c158df1e0248f0aad327ddefc168d480c2674cec29602a31a0 sha512sums = c08d9f25b8c7656b72da975c2ab580adfc8834a61c2dfec8296f19b6964460d12cad2100becadb7478cbccffa7c4805dbed80847c2a30075fc9fb31dee60ebe2 sha512sums = d22cdfd2a9e2b3296071d255deb0f9e3bab98a551150ccdb20bc8e947c3c4dd8a905e414bf4238357c400042cd399cc8bd15ea1eac0eea8ae2a1e1f71be7af55 + sha512sums = d7d9d4ee334068c14d80f567914775d2df9638b65d34763aab228dabcaeebace9db1a16f0e42ce657ade731ae34ebb23cee9a5cac8ad18b9c378606436266ffe source_x86_64 = clash-meta-bin-x86_64-v1.9.0.gz::https://github.com/MetaCubeX/Clash.Meta/releases/download/v1.9.0/Clash.Meta-linux-amd64-v1.9.0-8-g89609cc.gz sha512sums_x86_64 = df909ba3bc6806792a749dc7e3b8ffb94eccd940b75dc064371e8b0c5a54325b29e6a6dec81fac7062a384e50ae44263ca74c72356ed991d437a536aa884f666 diff --git a/.gitignore b/.gitignore index ec1c5713de95..c355b8ddb261 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ !clash.service !clash_user.service !clash-meta-bin.install +!config.yaml
\ No newline at end of file @@ -2,7 +2,7 @@ pkgname=clash-meta-bin pkgver=v1.9.0 -pkgrel=3 +pkgrel=4 pkgdesc="Clash Meta binary provided by MetaCubeX" provides=("clash") conflicts=("clash" "clash-tun" "clash-dev-git" "clash-premium-bin" "clash-premium-tun") @@ -13,10 +13,12 @@ depends=("glibc") install=${pkgname}.install source=("clash@.service" "clash_user.service" - "clash.service") + "clash.service" + "config.yaml") sha512sums=('3d4b599a972caab7238f405d57e8ec74f9d0f51bc2b51f6656305f3a46aecd4d1d5c10a16415c3c158df1e0248f0aad327ddefc168d480c2674cec29602a31a0' 'c08d9f25b8c7656b72da975c2ab580adfc8834a61c2dfec8296f19b6964460d12cad2100becadb7478cbccffa7c4805dbed80847c2a30075fc9fb31dee60ebe2' - 'd22cdfd2a9e2b3296071d255deb0f9e3bab98a551150ccdb20bc8e947c3c4dd8a905e414bf4238357c400042cd399cc8bd15ea1eac0eea8ae2a1e1f71be7af55') + 'd22cdfd2a9e2b3296071d255deb0f9e3bab98a551150ccdb20bc8e947c3c4dd8a905e414bf4238357c400042cd399cc8bd15ea1eac0eea8ae2a1e1f71be7af55' + 'd7d9d4ee334068c14d80f567914775d2df9638b65d34763aab228dabcaeebace9db1a16f0e42ce657ade731ae34ebb23cee9a5cac8ad18b9c378606436266ffe') sha512sums_x86_64=('df909ba3bc6806792a749dc7e3b8ffb94eccd940b75dc064371e8b0c5a54325b29e6a6dec81fac7062a384e50ae44263ca74c72356ed991d437a536aa884f666') source_x86_64=("${pkgname}-x86_64-${pkgver}.gz::${url}/download/${pkgver}/Clash.Meta-linux-amd64-${pkgver}-8-g89609cc.gz") @@ -24,6 +26,7 @@ source_x86_64=("${pkgname}-x86_64-${pkgver}.gz::${url}/download/${pkgver}/Clash. package() { cd ${srcdir} install -Dm755 "${pkgname}-${CARCH}-${pkgver}" "${pkgdir}/usr/bin/clash" + install -Dm 644 config.yaml "${pkgdir}"/etc/clash/config.yaml install -Dm644 "clash.service" "${pkgdir}/usr/lib/systemd/system/clash.service" install -Dm644 "clash@.service" "${pkgdir}/usr/lib/systemd/system/clash@.service" install -Dm644 "clash_user.service" "${pkgdir}/usr/lib/systemd/user/clash.service" diff --git a/config.yaml b/config.yaml new file mode 100644 index 000000000000..d3d0e03e7459 --- /dev/null +++ b/config.yaml @@ -0,0 +1,66 @@ +# external-controller: 127.0.0.1:9090 +# external-ui: dashboard +# ipv6: false # When set to false, resolver won't translate hostnames to IPv6 addresses +# interface-name: + +dns: + enable: true + # listen: 0.0.0.0:53 + # ipv6: false # when the false, response to AAAA questions will be empty + + # These nameservers are used to resolve the DNS nameserver hostnames below. + # Specify IP addresses only + enhanced-mode: redir-host # or fake-ip + # fake-ip-range: 198.18.0.1/16 # Fake IP addresses pool CIDR + # use-hosts: true # lookup hosts and return IP record + + # Hostnames in this list will not be resolved with fake IPs + # i.e. questions to these domain names will always be answered with their + # real IP addresses + # fake-ip-filter: + # - '*.lan' + # - localhost.ptlogin2.qq.com + + # Supports UDP, TCP, DoT, DoH. You can specify the port to connect to. + # All DNS questions are sent directly to the nameserver, without proxies + # involved. Clash answers the DNS question with the first result gathered. + nameserver: + - 1.1.1.1 # default value + - 1.0.0.1 # default value + - tls://one.one.one.one # DNS over TLS + - https://1.1.1.1/dns-query # DNS over HTTPS + # When `fallback` is present, the DNS server will send concurrent requests + # to the servers in this section along with servers in `nameservers`. + # The answers from fallback servers are used when the GEOIP country + # is not `CN`. + # fallback: + # - tcp://1.1.1.1 + + # If IP addresses resolved with servers in `nameservers` are in the specified + # subnets below, they are considered invalid and results from `fallback` + # servers are used instead. + # + # IP address resolved with servers in `nameserver` is used when + # `fallback-filter.geoip` is true and when GEOIP of the IP address is `CN`. + # + # If `fallback-filter.geoip` is false, results from `nameserver` nameservers + # are always used if not match `fallback-filter.ipcidr`. + # + # This is a countermeasure against DNS pollution attacks. + # fallback-filter: + # geoip: true + # ipcidr: + # - 240.0.0.0/4 + # domain: + # - '+.google.com' + # - '+.facebook.com' + # - '+.youtube.com' + +# Enable the TUN listener +tun: + enable: true + stack: gvisor # only gvisor + dns-hijack: + - 198.18.0.1:53 # when `fake-ip-range` is 198.18.0.1/16, should hijack 198.18.0.2:53 + auto-route: true # auto set global route + |