dreamacro / clash Goto Github PK
View Code? Open in Web Editor NEWA rule-based tunnel in Go.
License: GNU General Public License v3.0
A rule-based tunnel in Go.
License: GNU General Public License v3.0
Just like the title described.Thanks for your excellent work.
shadowsocks的chacha20-ietf-poly1305加密,是否对应clash的AEAD_CHACHA20_POLY1305?
vmess是否支持混淆http?如果是,如何设置?如果不是希望增加支持。
感谢软件作者 @Dreamacro ,可以让我们用一个客户端整合两个主流的科学上网工具,希望越来越好。
希望能添加V2Ray动态端口支持。
请问可以在log-level里添加一个none的等级吗,即不显示任何日志?
我比较讨厌很长的配置,所以我基于国家来做分流,达到就近节点代理的目的。
但我测试访问 www.google.com 时,解析到 IP 216.58.200.228,IP 物理位置应该是在**,但是 GEOIP 的结果是美国。
ipip.net 很早之前就能查到大部分 google 的正确物理位置,它们的免费版精度也完全符合需求,官网地址 https://www.ipip.net/product/client.html (需注册才能下载)
官方提供的 golang sdk https://github.com/ipipdotnet/ipdb-go
所以是否考虑支持 ipip.net 免费离线库呢?
如题,�socks5 协议进行 speed test 时无显示,实际使用没有问题。
优先级比较低,有空的时候辛苦排期进行修复。
感谢您开发的软件。
ws协议有路径和host两个 支持host的添加吗?
希望修改为优先读取软件目录下, 该目录下没有配置文件再读取 $HOME 下的.
这样方便把软件放到 U 盘带着走.
https://nssurge.zendesk.com/hc/zh-cn/articles/360010038714-Surge-Mac-3-Release-Note
类似 Surge 3 的这种支持外部规则集
please support ssR and kcp in vmess
I want to unblock Netflix, but my vpn is only for ssr or kcp in vmess.
Would you plan to add these?
操作系统:macOS
我司的网站需要VPN拨入才能访问,使用Clash后网站可以打开,邮箱无法连接imap和smtp
查看日志发现网页访问有日志信息,但是Apple Mail访问就没有日志信息
请问除了使用IP-CIDR
一条一条的添加外,还有什么更简单的方法可以返回局域网流量吗?
看到 readme 中写到有支持,但是在配置文件里加入的时候发现不支持,config/config.go
中也没有看到解析相关配置的代码
Google Duckduckgo 都出现过,输入搜索内容回车后无响应,一小时能遇到两三次。
已经观察了几天,使用 ss-x-ng 完全没有问题。
我这边还有一些错误日志,不知道是否相关
2018/09/02 20:50:25:484 [warning] Proxy connect error: dial tcp 127.0.0.1:4300: connect: connection refused
2018/09/02 20:50:25:488 [warning] Proxy connect error: dial tcp 127.0.0.1:4300: connect: connection refused
2018/09/02 20:50:25:492 [warning] Proxy connect error: dial tcp 127.0.0.1:4300: connect: connection refused
2018/09/02 21:11:58:830 [warning] Proxy connect error: dial tcp 172.217.160.82:443: connect: operation timed out
2018/09/02 21:11:58:831 [warning] Proxy connect error: dial tcp 172.217.160.114:443: connect: operation timed out
I was told: Unexpected Error.We could not complete your purchase.
Even if I change my config to only "FINAL,,DIRECT", it still doesn't work.
自定义header的配置文件写法应该怎么写
发现域名大写就不能被识别了,可以考虑自动转换成小写,或在日志中给出提示
https://github.com/Fndroid/clash_for_windows_pkg/issues/18#issue-381843080
断开代理后均恢复
unc (t *Tunnel) configMonitor(signal chan<- struct{}) {
sub := cfg.Instance().Subscribe()
signal <- struct{}{}
for elm := range sub {
event := elm.(*cfg.Event)
switch event.Type {
case "proxies":
proxies := event.Payload.(map[string]C.Proxy)
t.configLock.Lock()
t.proxies = proxies
t.configLock.Unlock()
case "rules":
rules := event.Payload.([]C.Rule)
t.configLock.Lock()
t.rules = rules
t.configLock.Unlock()
case "mode":
t.mode = event.Payload.(cfg.Mode)
case "log-level":
t.logLevel = event.Payload.(C.LogLevel)
}
}
}
here just convert to list ,But if the contents are
- 'IP-CIDR,172.16.0.0/12,DIRECT,no-resolve'
- 'IP-CIDR,100.64.0.0/10,DIRECT,no-resolve'
- 'IP-CIDR,10.0.0.0/8,DIRECT,no-resolve'
- 'FINAL,,DIRECT'
- 'DOMAIN-SUFFIX,xxx.com,yyy'
When I visit xxx.com It will match the FINAL rule.
maybe we can specify a order to every match type? then we when read the files, we sort them.
DOMAIN-SUFFIX 1
DOMAIN-KEYWORD 2
IP-CIDR 3
FINAL 4
使用clashx,mojave10.14
开启clashx后,dns解析超时,关闭后可以正常解析。更换114dns后问题解决。
已知有问题的的dns:123.123.123.123(北京联通默认dns)
目前已知网站
huaban.com
chinacdc.com
My company urge us connect to outside network behind a http proxy.
Could clash support proxy chain which would let shadowsocks send its TCP connect through a http proxy.
网站能正常打开,但是有错误日志:
[warning] Proxy connect error: dial tcp: lookup xpxjhw6j24w8s6md.skt.ipip.net: no such host
I had to copy tcp_freebsd.go -> tcp_freebsd.go
and apply the following patch:
+++ proxy/redir/tcp_freebsd.go
@@ -38,7 +38,8 @@ func parserPacket(conn net.Conn) (socks.
func getorigdst(fd uintptr) (socks.Addr, error) {
raw := syscall.RawSockaddrInet4{}
siz := unsafe.Sizeof(raw)
- if err := socketcall(GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&raw)), uintptr(unsafe.Pointer(&siz)), 0); err != nil {
+ _, _, err := syscall.Syscall6(syscall.SYS_GETSOCKOPT, fd, syscall.IPPROTO_IP, SO_ORIGINAL_DST, uintptr(unsafe.Pointer(&raw)), uintptr(unsafe.Pointer(&siz)), 0);
+ if err != 0 {
return nil, err
}
版本:0.9.1
当前的Traffic API返回的流量统计只有全局流量统计,用户很难判断当前应用流量是走了proxy group还是direct。
希望开发者可以为流量统计添加对应的分组,类似:
{
"group": [
{"name":"direct", "up":0, "down":0},
{"name":"proxyA", "up":0, "down":0},
{"name":"proxyB", "up":0, "down":0}
]
}
Is it possible publish clash to homebrew??
If you have a server utilized vmess+ws+tls and set headers
parameter in wsSettings
section in the server side configuration, the clash would not work properly to connect to this server, in other word, the hand request would be refused by the remote. This problem is not platform specific 'cuz I met them on all three OS platforms, which means whatever clash client (clash core, clashx or clash for win) you use, the problem exists.
In clash local configuration file, there is no place to set headers
parameter according to the sample file, neither user-agent
nor connectionReuse
.
Fully support project-v core features on vmess+ws+tls configuration in clash core if the hypothesis is accepted.
It would be great if vmess+ws can be supported in the upcoming version.
网站 https://toefl.etest.net.cn
进入点击中文版时,无法正常打开。
中文版链接本来应为“https://toefl.etest.net.cn/cn”
但开启代理时就会跳转到“https://toefl.etest.net.cnhttp//toefl.etest.net.cn/cn”
开启代理时直接访问中文版链接 https://toefl.etest.net.cn/cn 正常
日志如下
2018/08/15 19:22:40:624 [info] toefl.etest.net.cn match DomainSuffix using DIRECT
2018/08/15 19:22:47:628 [info] toefl.etest.net.cnhttp match FINAL using Proxy
配置文件dns的fallback字段配置为8.8.4.4,运行出错,提示
panic: runtime error: index out of range
goroutine 75 [running]:
github.com/Dreamacro/clash/dns.(*Resolver).resolveIP(0xc00005cc80, 0xc00018d320, 0xc00015cdd8, 0xc00005cc80, 0xc00015cda0)
/home/travis/gopath/src/github.com/Dreamacro/clash/dns/client.go:135 +0x2b7
github.com/Dreamacro/clash/dns.(*Resolver).Exchange(0xc00005cc80, 0xc00018d320, 0x0, 0x0, 0x0)
/home/travis/gopath/src/github.com/Dreamacro/clash/dns/client.go:77 +0x1eb
github.com/Dreamacro/clash/dns.(*Server).ServeDNS(0xc0001543a0, 0x8f8920, 0xc000189b00, 0xc00018d320)
/home/travis/gopath/src/github.com/Dreamacro/clash/dns/server.go:20 +0x3d
github.com/miekg/dns.(*Server).serveDNS(0xc00001e600, 0xc000189b00)
/home/travis/gopath/pkg/mod/github.com/miekg/[email protected]/server.go:688 +0x2c1
github.com/miekg/dns.(*Server).serve(0xc00001e600, 0xc000189b00)
/home/travis/gopath/pkg/mod/github.com/miekg/[email protected]/server.go:573 +0x2d8
github.com/miekg/dns.(*Server).worker(0xc00001e600, 0xc000189b00)
/home/travis/gopath/pkg/mod/github.com/miekg/[email protected]/server.go:244 +0x4d
created by github.com/miekg/dns.(*Server).spawnWorker
/home/travis/gopath/pkg/mod/github.com/miekg/[email protected]/server.go:284 +0x86
注释掉fallback字段后正常
切换到其他线路后 浏览器还是使用旧的IP
clashX 的 set as system proxy 选项重新开启无效
重启 clashX app 有效
重启浏览器有效
系统:macOS Mojave
浏览器 Safari, Chrome
Since we now have PATCH /configs
, could we have PATCH
added to the CORS allowed method list?
Currently in v0.10.0
, I can see:
# partial of hub/route/server.go
cors := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Content-Type", "Authorization"},
MaxAge: 300,
})
日志里根本无法匹配
./clash-linux
INFO[0000] Can't find MMDB, start download
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x784846]
goroutine 1 [running]:
github.com/Dreamacro/clash/config.parseDNS(0x0, 0xc00019c3c0, 0x4, 0x4)
/home/travis/gopath/src/github.com/Dreamacro/clash/config/config.go:391 +0x26
github.com/Dreamacro/clash/config.Parse(0xc00027e000, 0x24, 0x19, 0x887bb3, 0xa)
/home/travis/gopath/src/github.com/Dreamacro/clash/config/config.go:133 +0x142
github.com/Dreamacro/clash/hub/executor.ParseWithPath(0xc00027e000, 0x24, 0x24, 0x8f0340, 0x10)
/home/travis/gopath/src/github.com/Dreamacro/clash/hub/executor/executor.go:20 +0x35
github.com/Dreamacro/clash/hub/executor.Parse(0x10, 0x10, 0x8)
/home/travis/gopath/src/github.com/Dreamacro/clash/hub/executor/executor.go:15 +0x45
github.com/Dreamacro/clash/hub.Parse(0xc000020220, 0x19)
/home/travis/gopath/src/github.com/Dreamacro/clash/hub/hub.go:10 +0x26
main.main()
/home/travis/gopath/src/github.com/Dreamacro/clash/main.go:39 +0x8b
系统:deepin15.8
请问这错误是软件自身问题还是与系统有关,该如何解决?
I'm developing a proxy tool for GNU/Linux based on Clash, which would call the REST API.
Currently, I could know about the API by reading source codes, but it will be better if there're some documentations.
有些国内域名希望可以选择是代理还是直连
这问题已经在这里讨论过
https://github.com/Fndroid/clash_for_windows_pkg/issues/11
最后发现是reject规则导致页面崩溃
在macOS上,使用docker启动clash,dns无法访问,命令是
docker run -d --name=clash --restart=always -p 7890:7890 -p 7891:7891 -p 7892:7892 -p 53:53/udp -v /Users/t.l/Google\ 云端硬盘/Services/clash/config.yml:/root/.config/clash/config.yml dreamacro/clash
以下代码在 privoxy 和 Brup Suite 提供的 HTTP代理下均可正常工作 (将 clash socks 设为上级代理)
但是在 clash 提供的 HTTP代理下,clash疑似会卡到连接超时为止。
<?php
$fileUrl = 'http://repo.packagist.org/packages.json';
$options = array (
'http' =>
array (
'follow_location' => 0,
'max_redirects' => 20,
'proxy' => 'tcp://127.0.0.1:8888',
'request_fulluri' => true,
'protocol_version' => 1.1,
'header' =>
array (
0 => 'Accept-Encoding: gzip',
1 => 'Connection: close',
2 => 'User-Agent: Composer/source (Windows NT; 10.0; PHP 7.2.12)',
),
'ignore_errors' => true,
)
);
$context = stream_context_create($options);
$result = file_get_contents($fileUrl, false, $context);
echo zlib_decode($result);
自定义规则的部分,开头有个横线。我知道这是yaml的语法规则,但是从ss/surge等应用导入规则就会太麻烦了,多了甚至只能用脚本处理。能否也支持没有横线开头的配置文件,直接粘贴过来就能用了,对通用性来说很有必要。
比如domain proxy 这种的规则,有可能是非常多的,如果全写在默认的配置文件中,显得有点太重了,维护不够方便。希望能像SpechtLite那样,支持从文件中读取规则
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.