可以配置 Xamarin Mac Agent 的端口吗?(到端口 22 以外的其他端口) [英] Can the Xamarin Mac Agent's port be configured? (to something other than port 22)

查看:29
本文介绍了可以配置 Xamarin Mac Agent 的端口吗?(到端口 22 以外的其他端口)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在配置我的网络防火墙,以允许在我离开家时连接到我的 Mac 构建服务器.我想设置端口转发,以通过端口 22 的替代方案将流量发送到 Mac.

I'm configuring my network's firewall to permit connecting to my Mac build server when I'm away from my house. I would like to set up port forwarding to send traffic to the Mac via an alternative to port 22.

能否将 Xamarin Mac 代理配置为侦听 22 以外的端口?Visual Studio 是否允许通过 22 以外的端口连接到 Mac 代理?

Can the Xamarin Mac Agent be configured to listen on a port other than 22? Does Visual Studio permit connecting to the Mac Agent on a port other than 22?

推荐答案

Zagaeski 的解决方案似乎停止在新的 VS/Xamarin 版本上工作...我在这里使用不同的方法;在我的 Windows 机器上,我创建了一个端口转发规则,如下所示:

It seems that Zagaeski’s solution stopped working on new VS/Xamarin versions... I am using a different approach here; on my Windows machine, I have created a port forwarding rule, like this:

netsh interface portproxy add v4tov4 listenport=22 listenaddress=127.0.0.1 connectport=REMOTE_PORT connectaddress=REMOTE_HOST_OR_IP_ADDRESS

就我而言,REMOTE_PORT 是 17352,REMOTE_HOST_OR_IP_ADDRESS 是我要连接的远程网络的主机名(DNS 名称或 IP 地址).

In my case, REMOTE_PORT is 17352 and REMOTE_HOST_OR_IP_ADDRESS is the hostname (DNS name or IP Address) of the remote network I am connecting to.

这样我就可以通过端口 22(内部重定向到我的远程主机/端口)将我的 Visual Studio/Xamarim 连接到主机127.0.0.1":

This way I am able to connect my Visual Studio / Xamarim to the host "127.0.0.1", on port 22 (internally redirected to my remote host/port):

希望有帮助.

这篇关于可以配置 Xamarin Mac Agent 的端口吗?(到端口 22 以外的其他端口)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆