moonlight-stream / moonlight-ios

GameStream client for iOS/tvOS
GNU General Public License v3.0
1.16k stars 292 forks source link

Moonlight only supports adding PCs on local network on iOS/tvOS #417

Closed Alexie7777 closed 4 years ago

Alexie7777 commented 4 years ago

Is it the IOS limitation?

Heath123 commented 3 years ago

You can use AltStore or a jailbreak to sideload without paying

Mazztwo commented 3 years ago

This worked like a charm! I develop mobile apps for a living, so I was able to remove ENABLE_APP_STORE_RESTRICTIONS by searching for it. I then ran 'git submodule update --init --recursive' like @don17sch suggested. Then I built the app and put it on my iPad. I disconnected my iPhone and iPad from wifi and then connected the iPad to my iPhones mobile hotspot. I am able to connect to my laptop over cellular :)

THANK GOD for open source software. Also THANK YOU to @cgutman for everything, always <3

U-siro commented 2 years ago

I found a alternate method to bypass this limitation. Use a IPv6 address: if your ip is 1.1.1.1 input ::ffff:1.1.1.1 Then it will added without any vpn.

https://www.ibm.com/docs/en/zos/2.4.0?topic=addresses-ipv4-mapped-ipv6

fknfilewalker commented 2 years ago

Why is this not allowed for moonlight but microsoft remote desktop can do it?

cgutman commented 2 years ago

Why is this not allowed for moonlight but microsoft remote desktop can do it?

Section 4.2.7 of the App Store Review Guidelines states:

If your remote desktop app acts as a mirror of specific software or services rather than a generic mirror of the host device, it must comply with the following:

Emphasis mine.

wangshuai-007 commented 2 years ago

I found,If I use ipv6 address,I can add my computer. curl 6.ipw.cn command can get my ipv6 address

hwillson commented 2 years ago

For anyone else landing here and looking for the simplest way to enable Moonlight on iOS to stream from a remote (e.g. cloud) server, @U-siro's above comment is absolutely all that is needed. Just get your remote server's IP, e.g. 1.2.3.4, then when you're adding a new host in the iOS Moonlight app, prefix the IP you enter with ::ffff: - e.g. ::ffff:1.2.3.4. That's it that's all - no need to build your own version of the client. I'm not sure which version of the Moonlight iOS client I'm using in case that matters, but I just downloaded whatever is the most recent version in the app store as of today.

austinarchibald commented 2 years ago

The ::ffff: workaround works great, but it doesn't work with URLs (e.g. DNS services that give a static URL that matches your dynamic IP address). I have to delete and re-add the host every so often. Not a huge deal, but wondering if there's a better solution to that? Thanks.

U-siro commented 2 years ago

The ::ffff: workaround works great, but it doesn't work with URLs (e.g. DNS services that give a static URL that matches your dynamic IP address). I have to delete and re-add the host every so often. Not a huge deal, but wondering if there's a better solution to that? Thanks.

@austinarchibald Is it means your real IP is behind DNS? as I tried, DNS Hostname works without any problem or checking.

austinarchibald commented 2 years ago

The ::ffff: workaround works great, but it doesn't work with URLs (e.g. DNS services that give a static URL that matches your dynamic IP address). I have to delete and re-add the host every so often. Not a huge deal, but wondering if there's a better solution to that? Thanks.

@austinarchibald Is it means your real IP is behind DNS? as I tried, DNS Hostname works without any problem or checking.

Correct, DNS hostname. Not working for me, and I've tried several cloud rigs I use, all with custom DNS hostnames. Only works when I type the IP address. It says:

Add Host Manually Could not connect to host. Ensure GameStream is enabled in GeForce Experience on your PC.

Aarav5255 commented 1 year ago

The ::ffff: workaround works great, but it doesn't work with URLs (e.g. DNS services that give a static URL that matches your dynamic IP address). I have to delete and re-add the host every so often. Not a huge deal, but wondering if there's a better solution to that? Thanks.

@austinarchibald Is it means your real IP is behind DNS? as I tried, DNS Hostname works without any problem or checking.

Correct, DNS hostname. Not working for me, and I've tried several cloud rigs I use, all with custom DNS hostnames. Only works when I type the IP address. It says:

Add Host Manually Could not connect to host. Ensure GameStream is enabled in GeForce Experience on your PC.

same, have you found any solutions?

austinarchibald commented 1 year ago

The ::ffff: workaround no longer works for me on tvOS. For some reason, my tvOS app showed no connection even though it does on all other clients, iPhone, Mac, Steam Deck, etc. So I removed host and tried to re-add, and I get the "enable GameStream" error. Tried rebooting the host. The host still works on my iPhone - I don't dare remove host and re-add to see if the workaround still works on iOS. Very strange. I don't want to have to set up a VPN.

bayramog commented 1 year ago

The ::ffff: workaround no longer works for me on tvOS. For some reason, my tvOS app showed no connection even though it does on all other clients, iPhone, Mac, Steam Deck, etc. So I removed host and tried to re-add, and I get the "enable GameStream" error. Tried rebooting the host. The host still works on my iPhone - I don't dare remove host and re-add to see if the workaround still works on iOS. Very strange. I don't want to have to set up a VPN.

I believe it is because of recent Moonlight client update on App Store. With the update non-default port support has been enabled for moonlight. Both IPv6 adresses and port separator are using ":" I think it is because of this change

austinarchibald commented 1 year ago

I believe it is because of recent Moonlight client update on App Store. With the update non-default port support has been enabled for moonlight. Both IPv6 adresses and port separator are using ":" I think it is because of this change

Interesting, is there a way around this? If not, we need it switched back...

bayramog commented 1 year ago

I believe it is because of recent Moonlight client update on App Store. With the update non-default port support has been enabled for moonlight. Both IPv6 adresses and port separator are using ":" I think it is because of this change

Interesting, is there a way around this? If not, we need it switched back...

As far as I tried, I couldn't find a way around. I believe the app needs a new implementation to better understand the difference between IPv6 and IPv4 with a special port.

cgutman commented 1 year ago

IPv6 addresses now need to be enclosed in brackets (like in URLs) to allow the (optional) port to be distinguished from the IPv6 address itself.

Example: [2001:db8::1] or [2001:db8::1]:47989

bayramog commented 1 year ago

IPv6 addresses now need to be enclosed in brackets (like in URLs) to allow the (optional) port to be distinguished from the IPv6 address itself.

Example: [2001:db8::1] or [2001:db8::1]:47989

This worked, thanks!

scaredowl commented 1 year ago

IPv6 addresses now need to be enclosed in brackets (like in URLs) to allow the (optional) port to be distinguished from the IPv6 address itself. Example: [2001:db8::1] or [2001:db8::1]:47989

This worked, thanks!

I've been try a lot of format and not working...

Should full format of the value be like ::ffff:[2001:db8::1]:47989 ?

Can you provide an example, Thanks!

austinarchibald commented 1 year ago

Can you provide an example, Thanks!

[::ffff:1.1.1.1] if using default port or [::ffff:1.1.1.1]:11111 if you need to specify a port.

FishOrBear commented 1 year ago

You can use url to access your host, I discovered it by accident. First of all, your device needs to be in the same local area network as your host, and then resolve the dns domain name to your wan ip. At this time, you can add the host normally, then you turn off your wifi, use the mobile network, restart moonlight, and you will You can connect to your host from the external network.

Humpzinho commented 1 year ago

For anyone else landing here and looking for the simplest way to enable Moonlight on iOS to stream from a remote (e.g. cloud) server, @U-siro's above comment is absolutely all that is needed. Just get your remote server's IP, e.g. 1.2.3.4, then when you're adding a new host in the iOS Moonlight app, prefix the IP you enter with ::ffff: - e.g. ::ffff:1.2.3.4. That's it that's all - no need to build your own version of the client. I'm not sure which version of the Moonlight iOS client I'm using in case that matters, but I just downloaded whatever is the most recent version in the app store as of today.

Hi, is it still working?

Epoch2022-iOS commented 1 year ago

我找到了一种替代方法来绕过这个限制。使用IPv6地址:如果您的ip是1.1.1.1输入::ffff:1.1.1.1然后它将在没有任何vpn的情况下添加。

https://www.ibm.com/docs/en/zos/2.4.0?主题=地址-ipv4-mapped-ipv6

hello, if I use ipv6, Does this mean that my remote computer needs to support ipv6?

Epoch2022-iOS commented 1 year ago

IPv6地址现在需要用括号括起来(如URL),以便将(可选)端口与IPv6地址本身区分开来。

示例:[2001:db8::1][2001:db8::1]:47989

hello,If my remote server uses a port other than the default 47989, how do I modify the port information

Epoch2022-iOS commented 1 year ago

对于任何在这里登陆并寻找启用iOS上的Moonlight从远程(例如云)服务器进行流式传输的最简单方法的人来说,@U-siro的上述评论绝对是全部需要的。只需获取远程服务器的IP,例如1.2.3.4,然后当您在iOS Moonlight应用程序中添加新主机时,将您输入的IP作为前缀::ffff:-例如::ffff:1.2.3.4。仅此而已-无需构建自己的客户端版本。我不确定我使用的是哪个版本的Moonlight iOS客户端,以防这很重要,但截至今天,我刚刚在应用程序商店下载了最新版本。

嗨,它还在工作吗?

hey, if you get the answer, pls share it!

pkpgdjk commented 1 year ago

It still works. I just tried today. but I have to use [ ] . For example, my server IP is 13.123.3.132. I use ::ffff:13.123.3.132 I got an error, but when I use [::ffff:13.123.3.132] it works fine.

Epoch2022-iOS commented 1 year ago

It still works. I just tried today. but I have to use [ ] . For example, my server IP is 13.123.3.132. I use ::ffff:13.123.3.132 I got an error, but when I use [::ffff:13.123.3.132] it works fine.

thanks bro! This is very important to me. by the way, One more question, does this method only support ipv6 addresses?

pkpgdjk commented 1 year ago

sry, can you give me more info about your question. if my understand is correct the server listening at ipv4, but we can pass the ipv4 in the format of ipv6 by using ::ffff:IPV4. So, the moonlight application can be bypassed by the method above . But I don't know we have to enable ipv6 for internet router or the target server or not.

Epoch2022-iOS commented 1 year ago

sry, can you give me more info about your question. if my understand is correct the server listening at ipv4, but we can pass the ipv4 in the format of ipv6 by using ::ffff:IPV4. So, the moonlight application can be bypassed by the method above . But I don't know we have to enable ipv6 for internet router or the target server or not.

thanks! my IPV4 address is 116.21.86.170,I input the [::ffff:116.21.86.170] when add the pc. but it does not work well, I get the Your device's network connection is blocking Moonlight. Streaming may not work while connected to this network error tips, It is worth noting that I used a custom port (36012) instead of the default port. pls help me....it's bad exp. for me.

pkpgdjk commented 1 year ago

have you try [::ffff:116.21.86.170]:36012

Epoch2022-iOS commented 1 year ago

have you try [::ffff:116.21.86.170]:36012

thanks!!!! dear!!! it's work!

Steinheausser commented 1 year ago

Hello, just wanted to leave this here in case anybody else is as dumb as me trying to get this working. If you are using sunshine and moonlight's ios client, ensure that you 1. have UPNP on sunlight enabled; 2. are on version 0.20 of sunlight; 3. follow the sunshine 0.20 instructions on uninstalling moonlight hosting services. These three things in tandem with passing through the ip via ipv6 as discussed removed my need for zerotier (which while performant, was unstable in random connection terminations on ios) hopefully it might work for you. I was previously having request timed out when I managed to connect to the PC. Thanks to all in the discussion up to this point.

Epoch2022-iOS commented 1 year ago

Hello, just wanted to leave this here in case anybody else is as dumb as me trying to get this working. If you are using sunshine and moonlight's ios client, ensure that you 1. have UPNP on sunlight enabled; 2. are on version 0.20 of sunlight; 3. follow the sunshine 0.20 instructions on uninstalling moonlight hosting services. These three things in tandem with passing through the ip via ipv6 as discussed removed my need for zerotier (which while performant, was unstable in random connection terminations on ios) hopefully it might work for you. I was previously having request timed out when I managed to connect to the PC. Thanks to all in the discussion up to this point.

thanks!I've fixed the issue and now I can connect to my remote PC via my iOS device

Jk541957 commented 1 year ago

I know I’m about 2 years late on this but any chance someone can share the IPA again with the restriction removed?

hwillson commented 1 year ago

@Jk541957 you shouldn't need it; just use the [::ffff:1.2.3.4] (where 1.2.3.4 is your IP) approach discussed in the last several comments of this thread.

RainySat commented 1 year ago

Try this method. First, add it using the internal IP address within the local network. Once the connection is successful, switch to the cellular network without deleting the existing Host entry, and add it again, this time using the URL. It will prompt an update success message. Now you can directly connect from the external network.

jakealsko commented 1 year ago

Hello, just wanted to leave this here in case anybody else is as dumb as me trying to get this working. If you are using sunshine and moonlight's ios client, ensure that you 1. have UPNP on sunlight enabled; 2. are on version 0.20 of sunlight; 3. follow the sunshine 0.20 instructions on uninstalling moonlight hosting services. These three things in tandem with passing through the ip via ipv6 as discussed removed my need for zerotier (which while performant, was unstable in random connection terminations on ios) hopefully it might work for you. I was previously having request timed out when I managed to connect to the PC. Thanks to all in the discussion up to this point.

I did all of these things and I still get "Could not connect to host." What am I doing wrong?

GabrielNezovic commented 1 year ago

Thanks to U-siro's suggestion, this IPv6 work-around is working perfectly for me using the following steps -

  1. Open the iOS App and select "Add Host Manually"
  2. Enter the local IP address of your Host Gaming PC (eg, 192.168.1.5) and tap OK.
  3. A pop-up message should be displayed on both the iOS App and the Host Gaming PC - enter the security code into the Host Gaming PC to validate the connection
  4. Close the iOS App from the App Switcher
  5. Open the iOS App again and select "Add Host Manually"
  6. Enter ::ffff: followed by the Public IP Adress of the Host Gaming PC, eg ::ffff:123.456.789.000
  7. If all goes well, another pop-up message will be displayed in the iOS App to say "Host Successfully Updated".

That's it! You should now be able to connect to your Host Gaming PC remotely.

predprey2 commented 11 months ago

Has something changed recently with local network privacy in iOS 17? Not sure when it started, but on iOS 17 iPhone 14, Moonlight stopped discovering devices on local network.

EDIT: Updating Sunshine fixed the issue https://github.com/LizardByte/Sunshine/commit/4a2f7023ec687c3ecf928632cc58aa30ade3268a

Madmegsox1 commented 9 months ago

I think WAN connections will be allowed in iOS17.4 due to the EU regulations. Is there a possibility that this could be looked at into?