Clash.Mini
A simple GUI for Clash.
Why this repo
Provide a simple GUI for clash on windows platform.
Based on project TrayedClash by imgk
Features
- Simple GUI written by Golang only
- Integrated core
Provide a simple GUI for clash on windows platform.
Based on project TrayedClash by imgk
我这里打开一个网页需要加载 fonts.googleapis.com
域名下的资源,查了下,这个域名不需要代理,在国内是可以直接打开的,但是只要是启动了 Clash.Mini,并且开启了 System Proxy, 这个域名就一直打不开,好像是被解析到国外了。
我看了下 Rules 里面的配置:
上面显示这个域名是直连的,但是打开 log 看了下,结果如下:
[ WARN ] [TCP] dial DIRECT (match Domain/fonts.googleapis.com) to fonts.googleapis.com:443 error: dial tcp4 172.217.31.10:443: i/o timeout
解析出来的 IP 是172.217.31.10
,我查了下这个IP是谷歌云在国外的地址,所以一直打不开。
是因为 DNS 设置的问题吗,我应该怎么设置才能正确解析呢。
解压后双击运行但无任何显示,在任务管理器中能看到进程运行一秒左右随即退出,将订阅文件 config.yaml 放置在目录中再运行问题依旧。
发布版本:Clash.Mini_v0.2.0_x64.7z
操作系统:ltsc 1809 build 17763.2928,已安装chromium edge、webview2
系统Win10 x64,VC运行库和NET6正常。
百分之百复现此问题,执行此操作后,打开的网址是:
http://127.0.0.1:8070/?hostname=127.0.0.1&port=9090&secret=
如果手动打开下面该网址则不会闪退
http://127.0.0.1:8070
比如 🍎 Apple: behavior: classical type: http url: 'https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script/rule/Clash/Apple/Apple.yaml' interval: 3600 path: ./Apple
System Proxy
is always enabled on booting.
I checked the code in func mEnabledFunc()
https://github.com/MetaCubeX/Clash.Mini/blob/develop/tray/func.go#L114
The mEnabled.Checked()
is always false on booting, which cause the else
condition is running.
Maybe we should check the value of autoproxy
config too?
Or initial mEnabled
value according to the value of autoproxy
?
I ❤ Microsoft :) https://github.com/golang/go/issues/32350
也许添加下 .js
的 mime 会好使
_ = mime.AddExtensionType(".js", "application/javascript")
以TUN模式退出,再次启动时无法初始化。需要取消TUN模式,或者再退出、启动才能正常使用。
2022-10-23T00:17:35+08:00 [ INFO ] [TUN] Creating adapter
2022-10-23T00:17:50+08:00 [ EROR ] [TUN] Timed out waiting for device query: 等待的操作过时。 (Code 0x00000102)
2022-10-23T00:17:50+08:00 [ EROR ] [TUN] Failed to setup adapter (problem code: 0x1F, ntstatus: 0xC0000035): 当文件已存在时,无法创建该文件。 (Code 0x000000B7)
2022-10-23T00:17:50+08:00 [ EROR ] Start TUN listening error: can't open tun: create tun: Error creating interface: Cannot create a file when that file already exists.
配置
mixed-port: 7890
# Port of HTTP(S) proxy server on the local end
# port: 7890
# Port of SOCKS5 proxy server on the local end
# socks-port: 7891
# Transparent proxy server port for Linux and macOS (Redirect TCP and TProxy UDP)
# redir-port: 7892
# Transparent proxy server port for Linux (TProxy TCP and TProxy UDP)
# tproxy-port: 7893
# HTTP(S) and SOCKS4(A)/SOCKS5 server on the same port
# mixed-port: 7890
# authentication of local SOCKS5/HTTP(S) server
# authentication:
# - "user1:pass1"
# - "user2:pass2"
# Set to true to allow connections to the local-end server from
# other LAN IP addresses
allow-lan: true
# This is only applicable when `allow-lan` is `true`
# '*': bind all IP addresses
# 192.168.122.11: bind a single IPv4 address
# "[aaaa::a8aa:ff:fe09:57d8]": bind a single IPv6 address
bind-address: '*'
# Clash router working mode
# rule: rule-based packet routing
# global: all packets will be forwarded to a single endpoint
# direct: directly forward the packets to the Internet
mode: rule
# Clash by default prints logs to STDOUT
# info / warning / error / debug / silent
log-level: info
# When set to false, resolver won't translate hostnames to IPv6 addresses
ipv6: false
# RESTful web API listening address
external-controller: 127.0.0.1:9090
# A relative path to the configuration directory or an absolute path to a
# directory in which you put some static web resource. Clash core will then
# serve it at `http://{{external-controller}}/ui`.
# external-ui: public
# Secret for the RESTful API (optional)
# Authenticate by spedifying HTTP header `Authorization: Bearer ${secret}`
# ALWAYS set a secret if RESTful API is listening on 0.0.0.0
# secret: "dcc2c709-49b7-49fb-a3f0-ea4d7d48894f"
# Outbound interface name
# interface-name: en0
# fwmark on Linux only
# routing-mark: 6666
# Static hosts for DNS server and connection establishment (like /etc/hosts)
#
# Wildcard hostnames are supported (e.g. *.clash.dev, *.foo.*.example.com)
# Non-wildcard domain names have a higher priority than wildcard domain names
# e.g. foo.example.com > *.example.com > .example.com
# P.S. +.foo.com equals to .foo.com and foo.com
hosts:
# '*.clash.dev': 127.0.0.1
# '.dev': 127.0.0.1
# 'alpha.clash.dev': '::1'
profile:
# Store the `select` results in $HOME/.config/clash/.cache
# set false If you don't want this behavior
# when two different configurations have groups with the same name, the selected values are shared
store-selected: false
# persistence fakeip
store-fake-ip: true
# DNS server settings
# This section is optional. When not present, the DNS server will be disabled.
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
default-nameserver:
- 114.114.114.114
- 8.8.8.8
enhanced-mode: fake-ip # or redir-host (not recommended)
# enhanced-mode: redir-host
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:
- 114.114.114.114 # default value
- 8.8.8.8 # default value
# - tls://dns.rubyfish.cn:853 # DNS over TLS
# - https://1.1.1.1/dns-query # DNS over HTTPS
# - dhcp://en0 # dns from dhcp
# - '8.8.8.8#en0'
# 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:
# - tls://dns.rubyfish.cn:853
# - 'tcp://1.1.1.1#en0'
# 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
# geoip-code: CN
# ipcidr:
# - 240.0.0.0/4
# domain:
# - '+.google.com'
# - '+.facebook.com'
# - '+.youtube.com'
# Lookup domains via specific nameservers
# nameserver-policy:
# 'www.baidu.com': '114.114.114.114'
# '+.internal.crop.com': '10.0.0.1'
proxies:
# Shadowsocks
# The supported ciphers (encryption methods):
# aes-128-gcm aes-192-gcm aes-256-gcm
# aes-128-cfb aes-192-cfb aes-256-cfb
# aes-128-ctr aes-192-ctr aes-256-ctr
# rc4-md5 chacha20-ietf xchacha20
# chacha20-ietf-poly1305 xchacha20-ietf-poly1305
- name: "ss"
type: ss
server:
port: 80
cipher: aes-128-gcm
password:
plugin: v2ray-plugin
plugin-opts:
mode: websocket # no QUIC now
tls: false
# skip-cert-verify: true
host:
path:
mux: false
# headers:
# custom: value
# socks5
- name: "socks"
type: socks5
server: 127.0.0.1
port: 1080
# username: username
# password: password
# tls: true
# skip-cert-verify: true
# udp: true
proxy-groups:
# select is used for selecting proxy or proxy group
# you can use RESTful API to switch proxy is recommended for use in GUI.
- name: Proxy
type: select
# disable-udp: true
proxies:
- ssgr
- ssha
rule-providers:
proxy:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt"
path: ./ruleset/proxy.yaml
interval: 86400
private:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt"
path: ./ruleset/private.yaml
interval: 86400
telegramcidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt"
path: ./ruleset/telegramcidr.yaml
interval: 86400
cncidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt"
path: ./ruleset/cncidr.yaml
interval: 86400
lancidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt"
path: ./ruleset/lancidr.yaml
interval: 86400
applications:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt"
path: ./ruleset/applications.yaml
interval: 86400
rules:
- RULE-SET,applications,DIRECT
- PROCESS-NAME,BitComet_x64.exe,DIRECT
- DOMAIN,clash.razord.top,DIRECT
- DOMAIN,yacd.haishan.me,DIRECT
- RULE-SET,private,DIRECT
- RULE-SET,proxy,socks
- RULE-SET,lancidr,DIRECT
- RULE-SET,cncidr,DIRECT
- RULE-SET,telegramcidr,socks
- GEOIP,LAN,DIRECT
- GEOIP,CN,DIRECT
- MATCH,socks
# tun:
# enable: true
# stack: system # or gvisor
# auto-route: true
# auto-detect-interface: true
# dns-hijack:
# - 198.18.0.2:53
v0.2.0
发布于 2022-9-11 👏
🎉特性
🎇其他
v0.1.9
发布于 2022-7-4 👏
🎉特性
🎇其他
v0.1.8
发布于 2022-6-17 👏
🎉特性
🎇其他
域名嗅探,用于嗅探TCP请求中实际的域名,而非clash的dns映射获取
sniffer:
enable: true #控制开关
sniffig:
- tls
- http
port-whitelist: #目的端口白名单,嗅探器只会嗅探白名单中的端口,默认0-65535,推荐设置成常见端口
- 80
- 443
- 8000-9000
skip-domain: # 嗅探的域名结果如果在此名单则不会生效
- baidu.com
- google.com
force-domain: # 需要嗅探的域名,这里域名是clash原有逻辑获取的域名,如为空则只会嗅探IP请求,填写'+'则嗅探所有请求
- +.qq.com
TCP并发连接将使用所有IP进行TCP握手,并使用最先握手的IP进行后续请求
tcp-concurrent: true #默认为false
Relay策略可以利用udo over tcp的协议支持UDP
优化节点过滤逻辑,当前将不会每次请求进行一次过滤匹配
IPv6
ipv6: false
将完全关闭IPv6请求,不允许IPv6请求连接,包括纯IPv6
DOQ
DOQ环流问题优化
v0.1.7
发布于 2022-05-14 👏
🎉特性
升级 Meta Kennel 为 Alpha
域名嗅探,
sniffer:
enable: true #控制开关
sniffig:
- tls
- http
port-whitelist: #目的端口白名单,嗅探器只会嗅探白名单中的端口,默认0-65535,推荐设置成常见端口
- 80
- 443
- 8000-9000
skip-domain: # 嗅探的域名结果如果在此名单则不会生效
- baidu.com
- google.com
force-domain: # 需要嗅探的域名,这里域名是clash原有逻辑获取的域名,如为空则只会嗅探IP请求,填写'+'则嗅探所有请求
- +.qq.com
TCP并发连接
tcp-concurrent: true #默认为false
Relay策略组
策略组过滤节点优化
🎇其他
false
将完全关闭IPv6请求,不允许IPv6请求连接,包括纯IPv6v0.1.6
发布于 2022-01-23 19:30 👏
🎉特性
Network
规则, 支持匹配网络类型 ( TCP / UDP )NOT
OR
AND
)
-AND,((DOMAIN,baidu.com),(NETWORK,UDP)),REJECT
-OR,((DOMAIN,baidu.com),(NETWORK,UDP)),REJECT
-NOT,(DOMAIN,baidu.com),REJECT
🎇修复
v0.1.6-pre
发布于 2022-01-05 19:00 👏
🎉特性
🎇修复
v0.1.4
Release on 2021-12-01 20:00 👏
Features
Fixes
PS.After opening TUN mode, close and restart the program in administrator mode
v0.1.4
发布于 2021-12-01 20:00 👏
🎉特性
🎇修复
PS. TUN模式打开后,需要关闭软件并以管理员模式重新启动程序
Source code(tar.gz)v0.1.4-pre
Release on 2021-11-30 19:00 👏
Features
Fixes
v0.1.4-pre
发布于 2021-11-30 19:00 👏
🎉特性
🎇修复
v0.1.3-pre
Release on 2021-06-06 02:50 👏
Features
Fixes
v0.1.3-pre
发布于 2021-06-06 02:50 👏
🎉特性
🎇修复
Release on 2021-05-30 00:50
Fixes
Release on 2021-05-29 23:30
Features
1、调整开机自启为 Task 模式
2、可选 默认设置代理
3、可选 GeoIP 数据库
4、流量信息 Win10通知 (如存在流量信息,会在软件开启或配置切换时弹出通知)
5、优化缓存文件清理
6、修复下载配置异常问题
7、修复切换配置问题
8、修复流量信息字段缺失导致闪退问题
1、开机自启,请在英文无空格路径使用,主要是xml编码问题,如有解决方案,欢迎PR~
Enjoy it !
Source code(tar.gz)1、优化了代码逻辑 2、增加开机启动模块(需要管理员模式运行操作) 3、更改默认icon
Bug: 1、设置开机启动,需要管理员模式运行,否则闪退。
Enjoy it !
Source code(tar.gz)trojan forked from https://github.com/p4gefau1t/trojan-go Usage build: go build -tags "full" client: ./trojan-go -client -remote xxx.com:443 -local
Clash A rule-based tunnel in Go. Features Local HTTP/HTTPS/SOCKS server with authentication support VMess, Shadowsocks, Trojan, Snell protocol support
ClashX A rule based proxy For Mac base on Clash. ClashX 旨在提供一个简单轻量化的代理客户端,如果需要更多的定制化,可以考虑使用 CFW Mac 版 Features HTTP/HTTPS and SOCKS protocol Surge lik
Clashcli A simple command-line client for Clash. Interacts with Clash using its REST API. Select nodes for groups Run latency test for a node Help $ c
without-clash An util to bypass clash-premium tun for commands Requirement Kernel Features: cgroup2 ebpf && cgroup2 sock attach point iproute2 Install
ClashWebLite ClashWebLite is a cross-platform lightweighted wrapper for Clash Premium on Desktop environment. http://127.0.0.1:9090/ui: Features Suppo
malgo Go bindings for miniaudio library. Requires cgo but does not require linking to anything on the Windows/macOS and it links only -ldl on Linux/BS
GoMRuby Package gomruby embeds mruby (mini Ruby) VM into Go. Documentation. Installation It's slightly more than just go get: go get -d github.com/Ale
Goldorak Go =========== > Goldorak GO ! Rétrolaser en action > Goldorak GO !! Va accomplir ta mission > Dans l'infini > Des galaxies > Poursuis ta lu
10 things Linux How do you advance your Linux skills when you are already comfortable with the basics? My solution was to come up with 10 subjects to
mini Mini is a small text editor, inspred by antirez's kilo editor. It aims to Keep it simple, stupid.
Mini Go Lisp Mini lisp interpreter written in Go. It is implemented with reference to the d-tsuji/SDLisp repository written in Java. Support System Fu
GoRose ORM _______ ______ .______ ______ _______. _______ / _____| / __ \ | _ \ / __ \ / || ____| |
is Professional lightweight testing mini-framework for Go. Easy to write and read Beautifully simple API with everything you need: is.Equal, is.True,
minidb rosedb 的 mini 版本,帮助理解 bitcask 存储模型以及 rosedb 项目。 需要说明的是,minidb 没有实现 bitcask 模型的多个数据文件的机制,为了简单,我只使用了一个数据文件进行读写。但这并不妨碍你理解 bitcask 模型。
mini tools handling migrasion database from cli
Golang Scanner Contoh pembuatan aplikasi Java menggunakan BlueJ cek disini, tetapi berikut ini adalah versi rebuild dari Java ke Golang, dengan menggu
Example Golang API backend rest implementation mini project Point Of Sale using Gin Framework and Gorm ORM Database.
Virtual-Operating-System This vitual os application consist of 3 mini applications embedded in it like weather app , text editor and calculator . APPS
You will avoid commands below defining every time in services. resp := Response{ Code: responseCode, Message: msg, Data: data, } http.ResponseWriter.W