跨平台本地端口转发解决方案

发布于 2025-01-30 13:10:07 字数 705 浏览 2 评论 0原文

我正在构建SaaS服务,需要从其用户的API中查询一些数据。通常,用户输入mydomain.com/endpoint的URL,服务提出了请求。但是,对于某些用户而言,终点是在NAT后面的本地网络中(例如myDomain.locain.locain.locain/endpoint),

我的想法是为用户提供最简单,跨平台和开放源解决方案< /strong>将本地端口(例如80或443)转发到我的服务器。这样做了,我可以从服务器到localhost:12345/endpoint

我可以想象许多解决方案,例如设置VPN(使用OpenVPN)或使用SSH端口转发(通过从本地到服务器进行SSH端口转发(使用SSH -F -N -R 12345:mydomain.local:80 server.com)。但是,问题是哪种解决方案将是非专业用户最容易使用的解决方案。

理想情况下,我将其视为跨平台应用程序(Windows,Max OS和Linux版本),它由我预先配置来与服务器交谈,获取本地URL和所需的服务器端端口(例如<mydomain.local12345在上面的示例中)开始转发。

更新以澄清我的问题:我要提出建议和建议,我应该考虑哪些解决方案/技术来解决我的问题。

I am building a SaaS service which needs to query some data from its user's APIs. Typically user enters a url like mydomain.com/endpoint and service makes requests. However, for some users the endpoint is in their local network behind NAT (say mydomain.local/endpoint)

My idea is to give users the easiest, cross-platform and open-source solution to forward a local port (like 80 or 443) to my server. Done that, I can make queries from server to localhost:12345/endpoint

I can imagine a number of solutions like setting up a vpn (using openvpn) or employing ssh port forwarding (by sshing from local to server with ssh -f -N -R 12345:mydomain.local:80 server.com). However the question is which solution will be the most easy to use for non-professional users.

Ideally, I see it as a cross-platform app (Windows, Max OS, and Linux versions), which is pre-configured by me to talk to my server, get a local url and a desired server-side port (like mydomain.local and 12345 in examples above) and start forwarding.

Update to clarify my question: I'm asking for advice and suggestions which solutions/technologies should I consider in attempt to solve my problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文