vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
17.4k stars 3.17k forks source link

玩GTA5的时候发现udp流量没有走代理,请问要怎么设置 #3463

Closed Yuko1997 closed 10 months ago

Yuko1997 commented 1 year ago

Verify Steps

OpenClash Version

v0.45.129-beta

Bug on Environment

Official OpenWrt

Bug on Platform

Linux-amd64(x86-64)

To Reproduce

20230815202032

Describe the Bug

fake-ip混合模式

OpenClash Log

OpenClash 调试日志

生成时间: 2023-08-15 20:22:20 插件版本: v0.45.129-beta 隐私提示: 上传此日志前请注意检查、屏蔽公网IP、节点、密码等相关敏感信息



#===================== 系统信息 =====================#

主机型号: Intel Default string
固件版本: iStoreOS 22.03.5 2023081110
LuCI版本: git-23.093.42303-d58cd69
内核版本: 5.10.176
处理器架构: x86_64

#此项有值时,如不使用IPv6,建议到网络-接口-lan的设置中禁用IPV6的DHCP
IPV6-DHCP: 

DNS劫持: 停用
#DNS劫持为Dnsmasq时,此项结果应仅有配置文件的DNS监听地址
Dnsmasq转发设置: 127.0.0.1#5335

#===================== 依赖检查 =====================#

dnsmasq-full: 已安装
coreutils: 已安装
coreutils-nohup: 已安装
bash: 已安装
curl: 已安装
ca-certificates: 已安装
ipset: 已安装
ip-full: 已安装
libcap: 已安装
libcap-bin: 已安装
ruby: 已安装
ruby-yaml: 已安装
ruby-psych: 已安装
ruby-pstore: 已安装
kmod-tun(TUN模式): 已安装
luci-compat(Luci >= 19.07): 已安装
kmod-inet-diag(PROCESS-NAME): 已安装
unzip: 已安装
iptables-mod-tproxy: 已安装
kmod-ipt-tproxy: 已安装
iptables-mod-extra: 已安装
kmod-ipt-extra: 已安装
kmod-ipt-nat: 已安装

#===================== 内核检查 =====================#

运行状态: 运行中
运行内核:Meta
进程pid: 20789
运行权限: 20789: cap_dac_override,cap_net_bind_service,cap_net_admin,cap_net_raw,cap_sys_ptrace,cap_sys_resource=eip
运行用户: nobody
已选择的架构: linux-amd64

#下方无法显示内核版本号时请确认您的内核版本是否正确或者有无权限
Tun内核版本: 2023.06.30
Tun内核文件: 存在
Tun内核运行权限: 正常

Dev内核版本: 
Dev内核文件: 不存在
Dev内核运行权限: 否

Meta内核版本: v1.15.0
Meta内核文件: 存在
Meta内核运行权限: 正常

#===================== 插件设置 =====================#

当前配置文件: /etc/openclash/config/Kuromis.yaml
启动配置文件: /etc/openclash/Kuromis.yaml
运行模式: fake-ip-mix
默认代理模式: rule
UDP流量转发(tproxy): 停用
自定义DNS: 启用
IPV6代理: 停用
IPV6-DNS解析: 停用
禁用Dnsmasq缓存: 停用
自定义规则: 启用
仅允许内网: 启用
仅代理命中规则流量: 停用
仅允许常用端口流量: 停用
绕过中国大陆IP: 启用
路由本机代理: 启用

#启动异常时建议关闭此项后重试
混合节点: 停用
保留配置: 停用

#启动异常时建议关闭此项后重试
第三方规则: 停用

#===================== 自定义规则 一 =====================#

rules:
- 'DOMAIN-KEYWORD,bing,Proxies'
- 'DOMAIN-SUFFIX,community.cloudflare.steamstatic.com,Proxies'
- 'DOMAIN-SUFFIX,kaspersky-labs.com,Proxies'
- 'DOMAIN-SUFFIX,www.znbbs.vip,DIRECT'
- 'DOMAIN-SUFFIX,www.qiqiboke.com,DIRECT'
- 'DOMAIN-SUFFIX,xgmenu.me,DIRECT'
- 'DOMAIN-KEYWORD,steamserver.net,DIRECT'
#- 'DOMAIN-KEYWORD,whatismyip,DIRECT'
- 'IP-CIDR,103.28.54.0/24,DIRECT'
- 'IP-CIDR,23.0.0.0/24,DIRECT'
- 'PROCESS-NAME,mosdns,DIRECT'
##- SCRIPT,quic,REJECT #shortcuts rule
##- SCRIPT,time-limit,REJECT #shortcuts rule

#===================== 配置文件 =====================#

port: 7890
socks-port: 7891
allow-lan: true
mode: rule
log-level: info
external-controller: 0.0.0.0:9090
dns:
  enabled: true
  nameserver:
  - tcp://127.0.0.1:5335
  - 127.0.0.1:5335
  fallback:
  - 8.8.8.8
  - 8.8.4.4
  - tls://1.0.0.1:853
  - tls://dns.google:853
  enable: true
  ipv6: false
  enhanced-mode: fake-ip
  fake-ip-range: 198.18.0.1/16
  listen: 0.0.0.0:7875
  fake-ip-filter:
  - "*.lan"
  - "*.localdomain"
  - "*.example"
  - "*.invalid"
  - "*.localhost"
  - "*.test"
  - "*.local"
  - "*.home.arpa"
  - time.*.com
  - time.*.gov
  - time.*.edu.cn
  - time.*.apple.com
  - time-ios.apple.com
  - time1.*.com
  - time2.*.com
  - time3.*.com
  - time4.*.com
  - time5.*.com
  - time6.*.com
  - time7.*.com
  - ntp.*.com
  - ntp1.*.com
  - ntp2.*.com
  - ntp3.*.com
  - ntp4.*.com
  - ntp5.*.com
  - ntp6.*.com
  - ntp7.*.com
  - "*.time.edu.cn"
  - "*.ntp.org.cn"
  - "+.pool.ntp.org"
  - time1.cloud.tencent.com
  - music.163.com
  - "*.music.163.com"
  - "*.126.net"
  - musicapi.taihe.com
  - music.taihe.com
  - songsearch.kugou.com
  - trackercdn.kugou.com
  - "*.kuwo.cn"
  - api-jooxtt.sanook.com
  - api.joox.com
  - joox.com
  - y.qq.com
  - "*.y.qq.com"
  - streamoc.music.tc.qq.com
  - mobileoc.music.tc.qq.com
  - isure.stream.qqmusic.qq.com
  - dl.stream.qqmusic.qq.com
  - aqqmusic.tc.qq.com
  - amobile.music.tc.qq.com
  - "*.xiami.com"
  - "*.music.migu.cn"
  - music.migu.cn
  - "+.msftconnecttest.com"
  - "+.msftncsi.com"
  - localhost.ptlogin2.qq.com
  - localhost.sec.qq.com
  - "+.qq.com"
  - "+.tencent.com"
  - "+.srv.nintendo.net"
  - "*.n.n.srv.nintendo.net"
  - "+.stun.playstation.net"
  - xbox.*.*.microsoft.com
  - "*.*.xboxlive.com"
  - xbox.*.microsoft.com
  - xnotify.xboxlive.com
  - "+.battlenet.com.cn"
  - "+.wotgame.cn"
  - "+.wggames.cn"
  - "+.wowsgame.cn"
  - "+.wargaming.net"
  - proxy.golang.org
  - stun.*.*
  - stun.*.*.*
  - "+.stun.*.*"
  - "+.stun.*.*.*"
  - "+.stun.*.*.*.*"
  - "+.stun.*.*.*.*.*"
  - heartbeat.belkin.com
  - "*.linksys.com"
  - "*.linksyssmartwifi.com"
  - "*.router.asus.com"
  - mesu.apple.com
  - swscan.apple.com
  - swquery.apple.com
  - swdownload.apple.com
  - swcdn.apple.com
  - swdist.apple.com
  - lens.l.google.com
  - stun.l.google.com
  - na.b.g-tun.com
  - "+.nflxvideo.net"
  - "*.square-enix.com"
  - "*.finalfantasyxiv.com"
  - "*.ffxiv.com"
  - "*.ff14.sdo.com"
  - ff.dorado.sdo.com
  - "*.mcdn.bilivideo.cn"
  - "+.media.dssott.com"
  - shark007.net
  - Mijia Cloud
  - "+.cmbchina.com"
  - "+.cmbimg.com"
  - local.adguard.org
  - "+.sandai.net"
  - "+.n0808.com"
- GEOIP,CN,DIRECT
- MATCH,Others
redir-port: 7892
tproxy-port: 7895
mixed-port: 7893
bind-address: "*"
external-ui: "/usr/share/openclash/ui"
ipv6: false
geodata-mode: true
geodata-loader: standard
tcp-concurrent: true
sniffer:
  enable: true
  parse-pure-ip: true
  force-domain:
  - "+.netflix.com"
  - "+.nflxvideo.net"
  - "+.amazonaws.com"
  - "+.media.dssott.com"
  skip-domain:
  - "+.apple.com"
  - Mijia Cloud
  - dlg.io.mi.com
  sniff:
    TLS:
    HTTP:
      ports:
      - 80
      - 8080-8880
      override-destination: true
tun:
  enable: true
  stack: system
  device: utun
  auto-route: false
  auto-detect-interface: false
  dns-hijack:
  - tcp://any:53
profile:
  store-selected: true
  store-fake-ip: true

#===================== Tun设备状态 =====================#

utun: tun

#===================== 端口占用状态 =====================#

tcp        0      0 198.18.0.1:42067        0.0.0.0:*               LISTEN      20789/clash
tcp        0      0 :::7890                 :::*                    LISTEN      20789/clash
tcp        0      0 :::7891                 :::*                    LISTEN      20789/clash
tcp        0      0 :::7892                 :::*                    LISTEN      20789/clash
tcp        0      0 :::7893                 :::*                    LISTEN      20789/clash
tcp        0      0 :::7895                 :::*                    LISTEN      20789/clash
tcp        0      0 :::9090                 :::*                    LISTEN      20789/clash
udp        0      0 :::7875                 :::*                                20789/clash
udp        0      0 :::7891                 :::*                                20789/clash
udp        0      0 :::7892                 :::*                                20789/clash
udp        0      0 :::7893                 :::*                                20789/clash
udp        0      0 :::7895                 :::*                                20789/clash
udp        0      0 :::50989                :::*                                20789/clash

#===================== 测试本机DNS查询(www.baidu.com) =====================#

Server:     127.0.0.1
Address:    127.0.0.1:53

Non-authoritative answer:
www.baidu.com   canonical name = www.a.shifen.com
Name:   www.a.shifen.com
Address: 120.232.145.185
Name:   www.a.shifen.com
Address: 120.232.145.144

Non-authoritative answer:
www.baidu.com   canonical name = www.a.shifen.com

#===================== 测试内核DNS查询(www.instagram.com) =====================#

Status: 0
TC: false
RD: true
RA: true
AD: false
CD: false

Question: 
  Name: www.instagram.com.
  Qtype: 1
  Qclass: 1

Answer: 
  TTL: 187
  data: 118.184.78.78
  name: www.instagram.com.
  type: 1

### OpenClash Config

_No response_

### Expected Behavior

让它走代理

### Screenshots

![20230815202032](https://github.com/vernesong/OpenClash/assets/135049518/0632b9e1-3857-4136-aa2d-0a8dac2b8e85)
keay250 commented 1 year ago

如果全是direct的话可以先看看节点是否开启了udp

taoletsgo commented 1 year ago

可以参考我的

- name: GTAonline
    type: select
    proxies:
      - DIRECT
      - Proxy
      - HK 1
      - HK 2
      - JP 1
      - JP 2
      - US
      - TW
      - SG 
rules:
 - SRC-PORT,6672,GTAonline
  - DST-PORT,6672,GTAonline
  - DST-PORT,61455,GTAonline
  - DST-PORT,61456,GTAonline
  - DST-PORT,61457,GTAonline
  - DST-PORT,61458,GTAonline

规则放到最下面,但是在GEOIP和MATCH的上面 顺便提一下,现在gta最好的nat就是nat2中等,没有nat1完全了,我一般都是设置udp直连,tcp不设置规则让其走MATCH匹配,这样子直连也能赌场转盘

2300083469 commented 1 year ago

clash for windows 版本的怎么设置

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days