xcode 使用 VPN 连接在 iOS 模拟器中运行应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29880036/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 07:04:53  来源:igfitidea点击:

Run app in iOS simulator with VPN connection

iosxcodevpn

提问by Ashwani

I want to run my app in iOS simulator with VPN.

我想使用 VPN 在 iOS 模拟器中运行我的应用程序。

My mac is connected to a VPN network, i want to run my app in simulator, is this possible.

我的 mac 连接到 VPN 网络,我想在模拟器中运行我的应用程序,这可能吗?

Please help.

请帮忙。

回答by Kjuly

If your VPN is "L2TP over IPSec", just need to make sure you've checked "Send all traffic over VPN connection" in System Preferences / Network / YourVPN / Advanced:

如果您的 VPN 是“L2TP over IPSec”,只需确保您已“系统偏好设置/网络/YourVPN/高级”中选中“通过 VPN 连接发送所有流量”:

enter image description here

在此处输入图片说明

回答by Fede Henze

The answered marked as correct works but you need to start/restart the simulator once you are successfully connected to the VPN.

标记为正确的答案有效,但一旦成功连接到 VPN,您需要启动/重新启动模拟器。

I make this comment in order to avoid what happened to me. I spend a day trying to making vodo magic and at the end the solution was just restarting the simulator.

我发表此评论是为了避免发生在我身上的事情。我花了一天时间尝试制作 vodo 魔法,最后解决方案只是重新启动模拟器。

回答by Arun Gupta

Yes it is possible and i have already worked on iOS simulator with VPN connection. Basically you don't have to install or make any changes for this.

是的,这是可能的,我已经在使用 VPN 连接的 iOS 模拟器上工作过。基本上,您不必为此安装或进行任何更改。

When you connect to VPN on Mac you can browser the sites or system to which you are VPN connected. Since iOS simulator uses your Mac's connection it will also be able to connect to the VPN network.

当您在 Mac 上连接到 VPN 时,您可以浏览 VPN 连接到的站点或系统。由于 iOS 模拟器使用 Mac 的连接,因此它也可以连接到 VPN 网络。