Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mita是否可以指定出站流量或透過其他應用代理? #76

Closed
yatounoneko opened this issue Jul 26, 2023 · 7 comments
Closed
Labels
question General or technical questions

Comments

@yatounoneko
Copy link

例如使用WARP+解鎖某些應用,而WARP也提供了Local Proxy。

但mita的配置文件我似乎沒看到有能夠指定出站或二級代理的配置。
因此想請教一下是否有相應的配置,或透過其他應用能指定出站流量?

@enfein enfein added the question General or technical questions label Jul 26, 2023
@enfein
Copy link
Owner

enfein commented Jul 26, 2023

这里有一个类似的讨论 #74

如果可以把 WARP 流量打包成 socks5 丢给 mieru, 那么这个 socks5 的目标服务器就指定了 mita 出站流量将去往哪里。这就是为什么 mieru 可以作为 Tor 的前置代理。

如果 WARP 服务器在 mieru 和 mita 之间,也就是说我们需要指定一个特殊的 mieru 出站目标,那么这个功能是不支持的。

@yatounoneko
Copy link
Author

抱歉,有些不明白的地方,我的構想是:
(客戶端)mieru -> mita(服務端) -> WARP(客戶端,提供本地socks5/http服務) -> Internet -> WARP Server
那麼理應mieru客戶端得到的應該是WARP Server 的IP。

因爲warp本身是個客戶端,但提供http或socks5的的本地代理模式而不會接管所有流量(TUN會導致mita無法與mieru連接)。
mita可以透過配置文件添加sock5代理,連接warp客戶端提供的本地socks5做爲出站嗎?

@enfein
Copy link
Owner

enfein commented Jul 27, 2023

WARP 客户端是运行在本地还是运行在云上?如果是运行在本地,那么根本不需要 mieru 和 mita, 直接连 WARP 客户端就可以了。

@enfein
Copy link
Owner

enfein commented Jul 31, 2023

可能的解决方案:https://embiid.blog/post/WARP-does-not-work-after-submitting-an-invite-code/ 方法一

拓扑结构应该是 wrap client -- mieru -- mita -- cloudflare -- destination

@enfein
Copy link
Owner

enfein commented Jul 31, 2023

类似的讨论:warpdotdev/Warp#705 (comment)

@yatounoneko
Copy link
Author

yatounoneko commented Aug 1, 2023

Oh,是我沒講清楚,WARP是指Cloudflare WARP
Cloudflare WARP本身是類似隧道的服務,它能讓客戶端透過Cloudflare提供的IP代理客戶端流量。

而本身Cloudflare Warp也有提供本地socks5端口給其他應用進行二級代理(這類似mieru提供的socks5端口),所以我在想能不能在mita服務器配置cloudflare warp,而mita作爲前置服務讓mieru能夠透過cloudflare IP訪問互聯網。

簡單來說,當mieru連接到mita後,mita將出站流量中轉給cloudflare warp客戶端提供的本地socks5代理。
然後mieru理應獲得cloudflare IP而不是mita本機的IP,大概是這麼一個意思。

(warp server 的提供方是cloudflare, 並不是我們能控制的)

拓扑结构应该是 wrap client -- mieru -- mita -- cloudflare -- destination

我認爲Cloudflare Warp本身只是一個客戶端其目的就是讓客戶端連接cloudflare提供的網絡
而我的目的則是讓mieru拿到mita服務器獲取到cloudflare提供的本地IP,所以warp client應該是在mita後面
mieru -> 🔥🧱 -> mita -> warp client -> cloudflare -> destination

如果透過mieru全局代理所有流量的話,應該也能做到wrap client -- mieru -- mita -- cloudflare -- destination
但除了透過路由器進行全局代理外其他方式應該很難做到,因爲warp client會接管所有流量,導致mieru失效。
如果開啓warp client的代理模式,那麼warp就無法使用mieru的網絡,因爲warp client也沒有指定出站流量的選項...

這麼想mita如果能指定出站流量的話反而是更好的方式

@yatounoneko
Copy link
Author

Wait #77 to resolve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General or technical questions
Projects
None yet
Development

No branches or pull requests

2 participants