Shadowsocks-Net icon indicating copy to clipboard operation
Shadowsocks-Net copied to clipboard

移植到 UWP 平台的可行性探讨

Open bdbai opened this issue 8 years ago • 66 comments

  1. 基于原生 UWP VPN API 之前 @Noisyfox 在 shadowsocks/shadowsocks-windows#862 表示微软没有把文档放出来。事实上 MSDN 文档已经有了,只是描述不够清晰,也没有例子。按照前人在 iOS 上的做法,我大概有了一点点思路,但目前并没有着手实现。欢迎一起探讨。
  2. 桌面到通用 Windows 平台 (UWP) 桥 如果完全抛弃移动版用户,用这种方法也许可以少走些弯路,不过要牺牲掉一些 Win32 特性。

利益相关: Lumia 640 用户

bdbai avatar Jun 06 '17 06:06 bdbai

Lumia 640 (Windows Phone 10) 用户 + 1

pexcn avatar Jun 06 '17 07:06 pexcn

https://social.msdn.microsoft.com/Forums/windowsapps/en-US/ffe2645d-7a58-4241-8f2e-e9d1334771f1/uwphow-to-application-the-vpn-api-for-a-uwp-application?forum=wpdevelop

Our engineering team are working on publishing the VPN plug-in sample in MSDN

BestOwl avatar Jun 07 '17 09:06 BestOwl

@BestOwl I'm wondering if their engineering team are really working on it, or maybe we are deserted.

bdbai avatar Jun 07 '17 11:06 bdbai

@bdbai I was thinking about the same question.

Noisyfox avatar Jun 20 '17 05:06 Noisyfox

Surface Pro 4 User +1

tommyxu97 avatar Jul 04 '17 15:07 tommyxu97

I sent them a message on Twitter. Waiting to hear back.

florianmonfort avatar Jul 06 '17 06:07 florianmonfort

All my UWP apps are useless. 有很多的APP不可以用:

  • Facebook
  • Twitter
  • Instagram
  • SoundCloud
  • Messenger 。。。。

florianmonfort avatar Jul 06 '17 06:07 florianmonfort

@florianmonfort have you tried Proxifier as a workaround? https://www.proxifier.com/

celeron533 avatar Jul 06 '17 14:07 celeron533

I believe Shadowsocks client already uses Proxifier? Every time something goes wrong with my server I can see a Proxifier error in my browser, so I'm not sure why you're suggesting to use it?

By the way, some Microsoft guy's response on Twitter:

image

florianmonfort avatar Jul 07 '17 00:07 florianmonfort

@celeron533 I just looked at Proxifier's download page:

image

It clearly states for downloads for Windows 10*: Windows Desktop applications only

florianmonfort avatar Jul 07 '17 00:07 florianmonfort

Hi @florianmonfort , sorry I haven't tried it on my personal Win10 environment.

Windows 10*: Windows Desktop applications only

IMO, perhaps it only means the Proxifier application itself is winform/mfc based not UWP but still could be used for redirecting other UWP Apps' network usage (unconfirmed, just my personal assumption)

celeron533 avatar Jul 07 '17 02:07 celeron533

Nop, shadowsocks-windows uses Privoxy to adapt HTTP proxy to SOCKS5 protocol. Because not all the applications support socks5 proxy.

I believe Shadowsocks client already uses Proxifier? Every time something goes wrong with my server I can see a Proxifier error in my browser, so I'm not sure why you're suggesting to use it?

celeron533 avatar Jul 07 '17 02:07 celeron533

也有这个想法,跑来官方的repo想找有没有能够移植的代码,就看到了这个issue。

其实如果要是移植到UWP的话,最好还是支持MOBILE。因为这样意义就更加大了,否则其实如果已经有一个稳定的经典windows客户端,要去重新造一个轮子好像也没什么意义。

现在问题就是官方的文档描述不是很清晰,没有给相关的例程。

其实我觉得这些问题都不大,问题是到底能不能有一个sslocal稳定的在后台运行,不会被杀掉或者挂起,这是最重要的。

JamesMackerel avatar Jul 08 '17 18:07 JamesMackerel

另外,请问一下从哪里能看到这个项目的基本架构……我刚刚看了两小时都没想出怎么把ss的部分抽出来。

JamesMackerel avatar Jul 08 '17 18:07 JamesMackerel

是我肯定从头写,不会基于现在的win版开发uwp版。

Noisyfox avatar Jul 08 '17 18:07 Noisyfox

被源码虐了那么久之后我也是这么觉得的。感觉跟ui的耦合度太高了……

Noisyfox [email protected]于2017年7月9日 周日02:36写道:

是我肯定从头写,不会基于现在的win版开发uwp版。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/shadowsocks/shadowsocks-windows/issues/1177#issuecomment-313873656, or mute the thread https://github.com/notifications/unsubscribe-auth/AEwYhaduhCN78oRnsU4W-Qyhz8EM5Julks5sL8wegaJpZM4Nw7AP .

JamesMackerel avatar Jul 08 '17 23:07 JamesMackerel

从头写没问题,加密和随机数那部分别随便改就行了

wongsyrone avatar Jul 09 '17 00:07 wongsyrone

I personally don't care about mobile, just care if Shadowsocks can support UWP apps, is this going to happen? It's just more and more apps that will be unusable with time...

@celeron533 not sure I fully understand the translations of this thread!

florianmonfort avatar Jul 11 '17 08:07 florianmonfort

@florianmonfort We are actually discussing the possibility of making a UWP shadowsocks. IMO, if we do it recently and do not support windows mobile, it's not much a meaningful work, since legacy application runs well and supports many functions at the time.

JamesMackerel avatar Jul 11 '17 12:07 JamesMackerel

https://github.com/Microsoft/Windows-universal-samples/issues/699#event-1159114418

I asked sample from Microsoft, but they refused. I think we may contact directly to the support team.

JamesMackerel avatar Jul 11 '17 16:07 JamesMackerel

@JamesMackerel have you done so yet? Or are you waiting for someone to do it?

The legacy client supports a lot of features yes, but doesn't support UWP apps, and more and more apps are going to UWP including the most important ones... I'm so annoyed that I can't use my UWP apps right now

florianmonfort avatar Jul 12 '17 07:07 florianmonfort

@florianmonfort

Nope, it's only an idea at the time. For UWP apps, I saw an article at Stackoverflow says UWP apps would find proxy from Edge/IE automatically. In fact, I have tried to use Edge with this client and it works fine, only by using PAC mode, but haven't tried others.

If we are to develop a UWP client, we must get same sample rather than those doc from Microsoft. However, I will try, but I don't count on it very much.

JamesMackerel avatar Jul 12 '17 11:07 JamesMackerel

@JamesMackerel ok... So you are waiting to conclude on it once you have made a test?

florianmonfort avatar Jul 14 '17 08:07 florianmonfort

For UWP apps, I saw an article at Stackoverflow says UWP apps would find proxy from Edge/IE

@JamesMackerel that is a feature of HttpClient class, not every UWP application use it, and some use custom TCP/UDP protocol which definitely not using HttpClient.

UWP VPN API is the only way to proxify the whole system without the need to develop a custom network driver.

I hope M$ could release a sample code soon.

itsuki-hayashi avatar Aug 03 '17 06:08 itsuki-hayashi

@celeron533

IMO, perhaps it only means the Proxifier application itself is winform/mfc based not UWP but still could be used for redirecting other UWP Apps' network usage (unconfirmed, just my personal assumption)

Wrong. UI of the application does not matter. Proxifier uses Winsock Layered Service Provider to proxify applications, which is deprecated as of Windows 8, hence all Metro/UWP applications will simply bypass it, this is done by design.

Desktop application can use Windows Filtering Platform to proxify Metro/UWP applications, it is a new API meant to replace Layered Service Provider. However it runs as a network driver and require digital signature, which is far too expensive for a open source project.($223/yr for a code signing certificate from DigiCert, Symantec's will be more expensive).

UWP VPN API is the only proxifier API available for free at Windows platform.

itsuki-hayashi avatar Aug 03 '17 06:08 itsuki-hayashi

So just use Apple and Android device and let's give up the UWP.

Edsger Lin [email protected]于2017年8月3日 周四14:07写道:

For UWP apps, I saw an article at Stackoverflow says UWP apps would find proxy from Edge/IE

@JamesMackerel https://github.com/jamesmackerel that is a feature of HttpClient class, not every UWP application use it, and some use custom TCP/UDP protocol which definitely not using HttpClient.

UWP VPN API is the only way to proxify the whole system without the need to develop a custom network driver.

I hope M$ could release a sample code soon.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shadowsocks/shadowsocks-windows/issues/1177#issuecomment-319876785, or mute the thread https://github.com/notifications/unsubscribe-auth/AEwYhecI1dUpLmonN-aLhUEBrBjjpG23ks5sUWOYgaJpZM4Nw7AP .

JamesMackerel avatar Aug 03 '17 06:08 JamesMackerel

let's give up the UWP

Agreed. That's why M$ sucks.

wongsyrone avatar Aug 03 '17 06:08 wongsyrone

We are here to solve it, not to escape.

bdbai avatar Aug 03 '17 07:08 bdbai

We solve when there is a solution.

包布丁 [email protected]于2017年8月3日 周四15:01写道:

We are here to solve it, not to escape.

发件人: Syrone Wongmailto:[email protected] 发送时间: 2017年8月3日 14:29 收件人: shadowsocks/shadowsocks-windows<mailto: [email protected]> 抄送: 包布丁mailto:[email protected]; Mention<mailto: [email protected]> 主题: Re: [shadowsocks/shadowsocks-windows] 移植到 UWP 平台的可行性探讨 (#1177)

let's give up the UWP

Agreed. That's why M$ sucks.

― You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/shadowsocks/shadowsocks-windows/issues/1177#issuecomment-319880162>, or mute the thread< https://github.com/notifications/unsubscribe-auth/AFBqWm7gOTtmjx7cmeS9C2MUKxbrHIepks5sUWivgaJpZM4Nw7AP>.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shadowsocks/shadowsocks-windows/issues/1177#issuecomment-319885755, or mute the thread https://github.com/notifications/unsubscribe-auth/AEwYhXRM8Z33ooPgGOLE_fk4vmshs47wks5sUXA7gaJpZM4Nw7AP .

JamesMackerel avatar Aug 03 '17 07:08 JamesMackerel

UWP的话,会登陆Windows store吗

dongqiceo avatar Aug 03 '17 18:08 dongqiceo