Code Monkey home page Code Monkey logo

Comments (8)

bdbai avatar bdbai commented on August 22, 2024 1

我这里没有 V2Ray 相关的环境,用 Clash for Windows 代替试了一下,这个配置是可以用的:

[General]
# Log are for debug only
loglevel = error
# Do not remove tun-fd option
tun-fd = 233
dns-server = 223.5.5.5, 114.114.114.114

[Proxy]
Direct = direct
# 这里填本机的局域网地址和 V2Ray 客户端的监听端口,
# 需要客户端允许从局域网访问。
V2rayN = socks, 192.168.1.101, 7890

[Proxy Group]

[Rule]

# 应该是系统网络发现相关的 UDP 连接,排除掉。
IP-CIDR, 224.0.0.0/8, Direct
IP-CIDR, 239.0.0.0/8, Direct

# 一般代理客户端不会主动绑定接口,所以排除掉你的远端服务器,防止回环。
DOMAIN-SUFFIX, my.shiny.v2ray.server.com, Direct

FINAL, V2rayN

[Host]

需要注意的是 Maple 作为 UWP 不能直接访问本地回环端口,可以从局域网地址绕一下。可能还需要注意一下防火墙设定。

from maple.

GoBigorGoHome avatar GoBigorGoHome commented on August 22, 2024 1

@bdbai 按您给的新配置依然没成功,我用 clash 的 TUN mode 达到了目的。

from maple.

bdbai avatar bdbai commented on August 22, 2024
[General]
...保持默认,略...

[Proxy]
V2rayN = socks, 127.0.0.1, 10808

[Proxy Group]

[Rule]
FINAL, V2rayN

[Host]

不妨试一下这个?

from maple.

GoBigorGoHome avatar GoBigorGoHome commented on August 22, 2024

@bdbai 感谢答复。我最初是为了解决 Discord 更新失败的问题,详见 https://zhuanlan.zhihu.com/p/47048247 ,要点摘录如下

2021.04.19

最近注意到该方法可能已经由于Discord的更新而失效了,简单的查看了原因:

Update.exe检查更新工作现在由Discord内嵌的updater.node模块替代了,不吃全局模式,不吃命令行参数,整个喂不进去后续再看看有没有别的方法了,现在只能使用软路由或者一些虚拟网卡(思思tap)代理方式。

改用您给出的配置,Discord 仍然更新失败。在 Windows 的 Resource Monitor 里查看到Discord.exe 有几条这样的 TCP 连接
image
似乎都失败了。在 C:\Users\username\AppData\Local\Discord\Discord_updater_rCURRENT.log里看到

[2021-05-19 22:36:21.457310 +08:00] INFO [updater_client]: Updater received command 16: UpdateToLatest { options: Some(UpdateOptions { skip_host_delta: false, skip_module_delta: {} }) }
[2021-05-19 22:36:21.457455 +08:00] INFO [updater_client::install]: Starting update to latest.
[2021-05-19 22:36:21.457522 +08:00] INFO [updater_client::db]: Opening installer database (exclusive: true, caller: update_to_latest).
[2021-05-19 22:36:21.459552 +08:00] INFO [updater_client::db]: Opened installer database (exclusive: true, caller: update_to_latest).
[2021-05-19 22:36:21.459603 +08:00] INFO [updater_client::install]: Requesting manifest for HostIdentifier { name: "app", release_channel: "stable", platform: "win", arch: X86 }, from "https://discord.com/api/updates/"
[2021-05-19 22:36:25.468960 +08:00] INFO [updater_client::db]: Dropping database reference (exclusive: true, caller: "update_to_latest", strong count: 1)
[2021-05-19 22:36:25.469055 +08:00] ERROR [updater_client]: Failed 16: Other(Reqwest(reqwest::Error { kind: Request, url: "https://discord.com/api/updates/distributions/app/manifests/latest?channel=stable&platform=win&arch=x86", source: hyper::Error(Connect, Custom { kind: UnexpectedEof, error: "unexpected EOF during handshake" }) }))

请问如何让 Discord.exe 发出的请求走 v2ray 代理?

P.S. Resource Monitor 里 TCP Connections 信息的列名:
image

P.P.S. 请问 Maple 的 log 存储在哪里?

from maple.

bdbai avatar bdbai commented on August 22, 2024

请问 Maple 的 log 存储在哪里?

暂时只能挂调试器才能看到(

from maple.

xingdaos avatar xingdaos commented on August 22, 2024

我这里没有 V2Ray 相关的环境,用 Clash for Windows 代替试了一下,这个配置是可以用的:

[General]
# Log are for debug only
loglevel = error
# Do not remove tun-fd option
tun-fd = 233
dns-server = 223.5.5.5, 114.114.114.114

[Proxy]
Direct = direct
# 这里填本机的局域网地址和 V2Ray 客户端的监听端口,
# 需要客户端允许从局域网访问。
V2rayN = socks, 192.168.1.101, 7890

[Proxy Group]

[Rule]

# 应该是系统网络发现相关的 UDP 连接,排除掉。
IP-CIDR, 224.0.0.0/8, Direct
IP-CIDR, 239.0.0.0/8, Direct

# 一般代理客户端不会主动绑定接口,所以排除掉你的远端服务器,防止回环。
DOMAIN-SUFFIX, my.shiny.v2ray.server.com, Direct

FINAL, V2rayN

[Host]

需要注意的是 Maple 作为 UWP 不能直接访问本地回环端口,可以从局域网地址绕一下。可能还需要注意一下防火墙设定。

我看网上说可以通过配置来免除 UWP 不能直接访问本地回环端口的问题,建议可以合并到应用里:
image

from maple.

bdbai avatar bdbai commented on August 22, 2024

UWP 应用给自己解除网络隔离应该会涉及被禁用的 API,名义上是不允许的。

另外我试了下,即便解除了网络隔离好像也连不了本地回环地址,连接 socket 操作被拒绝了。不知道是哪里的问题..

@xingdaos 你这里有尝试过吗?

from maple.

CXwudi avatar CXwudi commented on August 22, 2024

感谢这个issue, 一直以来困扰我的CFW tun模式无法代理UDP的问题今天解决了, 原来windows会阻碍连接至localhost的udp包, 改成本机地址就好了
image

from maple.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.