Skip to content

Conversation

@yuhan6665
Copy link
Member

#4030

Please take a look @Fangliding

@Fangliding
Copy link
Member

其实把content附加回去就行了 之前剥掉content导致嗅探模块没读到嗅探请求导致的嗅探不生效 我没动是因为这样仍然无法解决inbound share

@yuhan6665
Copy link
Member Author

其实把content附加回去就行了 之前剥掉content导致嗅探模块没读到嗅探请求导致的嗅探不生效 我没动是因为这样仍然无法解决inbound share

I thought it should be safe to share inbound object and content object, since they just contain inbound configuration and not mutated. We just need to make sure the outbound object are segregated. Would it work?

@Fangliding
Copy link
Member

inbound的source会翻转

@Fangliding
Copy link
Member

content的attributes甚至会并发写导致panic

@Fangliding
Copy link
Member

session包里有一个deep clone outbound和content的 用那个就能解决问题了 只是inbound解决不了

@yuhan6665
Copy link
Member Author

I see.. looks like we need to find some id between the input of the tun and output of the tun and pass the correct context.

@yuhan6665 yuhan6665 marked this pull request as draft August 5, 2025 18:25
@yuhan6665
Copy link
Member Author

@Fangliding inbound 浅拷贝一下 用上 tun 出口的地址作为 source 你看行不 我之后再梳理一下 context 的用法。。

@Fangliding
Copy link
Member

@Fangliding inbound 浅拷贝一下 用上 tun 出口的地址作为 source 你看行不 我之后再梳理一下 context 的用法。。

那也没法正确反映source啊

@yuhan6665 yuhan6665 marked this pull request as ready for review August 17, 2025 14:38
@yuhan6665 yuhan6665 changed the title Try fix Wireguard inbound context sharing problem Wireguard inbound: Fix context sharing problem Aug 17, 2025
@yuhan6665
Copy link
Member Author

我大概看了一下 gvisor ForwarderRequest 无法简单的跟主连接 context 关联 目前先这样吧

@yuhan6665 yuhan6665 merged commit 337b4b8 into XTLS:main Aug 17, 2025
39 checks passed
maoxikun pushed a commit to maoxikun/Xray-core that referenced this pull request Aug 23, 2025
* Try fix Wireguard inbound context sharing problem

* Shallow copy inbound and content

* Fix context passing

* Add notes for source address

(cherry picked from commit 337b4b8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants