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

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

Closed
Alexie7777 opened this issue Sep 10, 2020 · 89 comments
Closed

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

Alexie7777 opened this issue Sep 10, 2020 · 89 comments

Comments

@Alexie7777
Copy link

Is it the IOS limitation?

@cgutman
Copy link
Member

cgutman commented Sep 10, 2020

Apple's App Store Review Guideline 4.2.7a states:

The app must only connect to a user-owned host device that is a personal computer or dedicated game console owned by the user, and both the host device and client must be connected on a local and LAN-based network.

Therefore, Moonlight does not allow you to add PCs that aren't on your local network anymore. This was a hard requirement by Apple's App Store Review team.

If you have to add your PC remotely, you may have success using a VPN like ZeroTier which looks like a LAN connection to other apps.

@cgutman cgutman closed this as completed Sep 10, 2020
@cgutman cgutman pinned this issue Sep 10, 2020
@cgutman cgutman changed the title Moonlight only supports adding PCs on local network on IOS Moonlight only supports adding PCs on local network on iOS/tvOS Sep 10, 2020
@abusse
Copy link

abusse commented Sep 15, 2020

Wouldn't it be possible to make/release a dedicated version that only allows desktop access like Shadow reverted to after the hassle with the quoted rules or restrict internet hosts to that functionality?

@cgutman
Copy link
Member

cgutman commented Sep 15, 2020

Nope, I proposed this exact thing to them and they rejected it.

@abusse
Copy link

abusse commented Sep 15, 2020

The first or the latter one (or both)? Was there something different that you proposed compared to how Shadow is doing it with their revised tvOS/iOS app?

@cgutman
Copy link
Member

cgutman commented Sep 15, 2020

Both. My proposed solution was essentially to act like a remote desktop app, similar to Microsoft Remote Desktop.

I asked about other game streaming apps that do the same thing, and they told me they are investigating those too for possible policy violations.

@abusse
Copy link

abusse commented Sep 15, 2020

May I ask about the timeline when you had this "discussion" with Apple? I'm asking because the Shadow app was kicked from the App Store for exactly that reason, but then re-allowed after removing the direct game access and reverting to remote desktop only. Their argument sounds like you had asked before that happened? Maybe it's worth another try with this precedent? Or they have additional information what is necessary to be allowed into the App Store like the Shadow app was.

@cgutman
Copy link
Member

cgutman commented Sep 26, 2020

The talks were after Shadow was re-approved.

I'm not going to be contesting this with Apple again anytime soon. Due to the review proceedings, I was left unable to ship any new Moonlight builds (even bugfixes) for over 3 months while this whole situation played out. If Nvidia had released a GFE update that required a Moonlight update, iOS users would have been unable to use the app anymore. It's simply not worth the risk to contest it.

@sean256
Copy link

sean256 commented Feb 5, 2021

How easy is it to disable the block should one build from source?

@abusse
Copy link

abusse commented Feb 5, 2021

It is pretty easy. There is just one definition of ENABLE_APP_STORE_RESTRICTIONS that enforces the App Store restrictions. Just make sure that you don't have set it during build and all App Store restrictions should be disabled (cf this).

@witchcraftsman
Copy link

witchcraftsman commented Apr 12, 2021

If you have to add your PC remotely, you may have success using a VPN like ZeroTier which looks like a LAN connection to other apps.

Since ZeroTier can't be used on tvos, what are the options other then source building (guess it'd also require apple dev account to deploy to the box, atm having none) ?
EDIT: I guess joining separate LANs with VPN would work but encryption overhead etc would kill its purpose

@redlinejoes
Copy link

redlinejoes commented Apr 26, 2021

If you have to add your PC remotely, you may have success using a VPN like ZeroTier which looks like a LAN connection to other apps.

Since ZeroTier can't be used on tvos, what are the options other then source building (guess it'd also require apple dev account to deploy to the box, atm having none) ?
EDIT: I guess joining separate LANs with VPN would work but encryption overhead etc would kill its purpose

This guy gets it. Although you typically want encryption, there is unnecessary overhead here with regards to streaming service providers infrastructure services. I’m planning to build from source and remove the limitation myself. I’m not interested in paying Apple the $99 annually at this time though. So I will go another step further and build a CI/CD server to push the build every week or as needed. If you’re interested in helping out, or learning from my experience, don’t hesitate to reach out. I’m so appreciative of moonlight being open source and these companies are all seemingly trying to stifle remote streaming service providers offerings. It wreaks of anti competitive action.

@Heath123
Copy link

Please can someone host builds with this enabled? People can sideload them with AltStore or a jailbreak

@boazvdwansem
Copy link

Please can someone host builds with this enabled? People can sideload them with AltStore or a jailbreak

Please?

@Heath123
Copy link

Heath123 commented Aug 4, 2021

If no one else is going to maybe I could but I’m not sure if I need a Mac OS VM to build it (I don’t have a Mac)

@Heath123
Copy link

Heath123 commented Aug 4, 2021

I'm installing Mac OS in a VM now, if I get it built I'll upload an IPA

@Heath123
Copy link

Heath123 commented Aug 4, 2021

image

@boazvdwansem
Copy link

I'm installing Mac OS in a VM now, if I get it built I'll upload an IPA

Had any success yet? I'm currently installing Mac OS in a VM as well, will post if I have anything to share.

@redlinejoes
Copy link

I have actual macOS physical systems but in order for me to do this, I would have to pay the $99 Apple Developer fee or be required to rebuild it every 7(days). That is the requirement if you do not jailbreak your iOS device which I had no intention of doing. This is really a headache and because I can use other apps like Splashtop, I've just stopped using Moonlight. I expected more "push back" by Moonlight senior dev towards Apple's anticompetitive tactics. How are you guys getting around the Apple developer costs? Or do you plan to use CI/CD to just keep pushing a new version every 7, or whatever number, of days?

@redlinejoes
Copy link

If no one else is going to maybe I could but I’m not sure if I need a Mac OS VM to build it (I don’t have a Mac)

As far as I know, it requires Xcode and TestFlight on macOS, so you do need an Apple system and you need an Apple Developer account. I've been an Apple Developer before so I'm familiar with the processes and procedures, but I'm open to hearing if there are other ways this can be done. I just don't want to jailbreak my device.

@boazvdwansem
Copy link

boazvdwansem commented Aug 4, 2021

If no one else is going to maybe I could but I’m not sure if I need a Mac OS VM to build it (I don’t have a Mac)

As far as I know, it requires Xcode and TestFlight on macOS, so you do need an Apple system and you need an Apple Developer account. I've been an Apple Developer before so I'm familiar with the processes and procedures, but I'm open to hearing if there are other ways this can be done. I just don't want to jailbreak my device.

I'm using a jailbreak for signing, you could also use altstore for signing.

@boazvdwansem
Copy link

Schermafbeelding 2021-08-05 021630
Does anyone know how to fix this?

@don17sch
Copy link

don17sch commented Aug 5, 2021

https://drive.google.com/drive/folders/13ebjY2qSVJebr2hLjTXTHkD981bl0Tb1?usp=sharing

Here you go. ipa built with the app store restriction removed

@boazvdwansem
Copy link

boazvdwansem commented Aug 5, 2021

https://drive.google.com/drive/folders/13ebjY2qSVJebr2hLjTXTHkD981bl0Tb1?usp=sharing

Here you go. ipa built with the app store restriction removed

Thank you very much. Do you happen to know why I got that error above?

@boazvdwansem
Copy link

Well it seems like even without the restriction on it won't work :/

@redlinejoes
Copy link

Well it seems like even without the restriction on it won't work :/

I was afraid of that. Maybe the Moonlight discord would be kind enough to give some advice. Have you tried there?

@boazvdwansem
Copy link

Well it seems like even without the restriction on it won't work :/

I was afraid of that. Maybe the Moonlight discord would be kind enough to give some advice. Have you tried there?

How did you get it to build tho? By looking at the commits I found that dbab078 Is the one where it’s introduced, by setting these values to false it should work.

@don17sch
Copy link

don17sch commented Aug 5, 2021

https://drive.google.com/drive/folders/13ebjY2qSVJebr2hLjTXTHkD981bl0Tb1?usp=sharing
Here you go. ipa built with the app store restriction removed

Thank you very much. Do you happen to know why I got that error above?

You needed to run this command in terminal. 'git submodule update --init --recursive'
you did not have the core part of moonlight added yet

@austinarchibald
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link
Member

cgutman commented Mar 17, 2023

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
Copy link

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
Copy link

scaredowl commented Mar 22, 2023

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
Copy link

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
Copy link

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
Copy link

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
Copy link

我找到了一种替代方法来绕过这个限制。使用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
Copy link

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
Copy link

对于任何在这里登陆并寻找启用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
Copy link

pkpgdjk commented Jun 9, 2023

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
Copy link

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
Copy link

pkpgdjk commented Jun 9, 2023

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
Copy link

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
Copy link

pkpgdjk commented Jun 12, 2023

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

@Epoch2022-iOS
Copy link

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

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

@Steinheausser
Copy link

Steinheausser commented Jun 18, 2023

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
Copy link

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
Copy link

Jk541957 commented Jul 8, 2023

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

@hwillson
Copy link

hwillson commented Jul 10, 2023

@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
Copy link

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
Copy link

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
Copy link

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

  • Ensure both the Host Gaming PC and iOS device are on the same Local Network.
  • Ensure that the following Network Ports are forwarded in any Routers and Firewalls along the network stream
TCP 47984, 47989, 48010
UDP 47998, 47999, 48000, 48002, 48010
  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
Copy link

predprey2 commented Dec 5, 2023

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
LizardByte/Sunshine@4a2f702

@Madmegsox1
Copy link

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?

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

No branches or pull requests