简体   繁体   English

通过入站套接字连接隧道出站HTTP

[英]Tunnel outbound HTTP over inbound socket connection

** This question might belong on SF except for one of the constraints below (not having admin rights on one machine) ** **此问题可能属于SF,但以下限制之一(在一台计算机上没有管理员权限)**

At my work I have two machines, A and B. Machine A is my primary development machine. 在我的工作中,我有两台机器A和B。机器A是我的主要开发机器。 It is completely disconnected from the corporate network. 它与公司网络完全断开。 Machine B is connected and is used primarily for email and web access. 机器B已连接,主要用于电子邮件和Web访问。 It is rather locked down - I don't have admin rights and it does not accept inbound connections. 它相当锁定-我没有管理员权限,并且不接受入站连接。 I cannot run programs I download, however I have Visual Studio 2005 and can create and run executables which works great (notwithstanding lack of admin rights). 我无法运行我下载的程序,但是我具有Visual Studio 2005,并且可以创建和运行效果很好的可执行文件(尽管缺少管理权限)。

I have an ad-hoc wireless network between the two and I'm able to transfer files via standard Windows shares so long as I browse from Machine B to a share on Machine A. I am also able to browse to websites hosted on Machine A, including non-standard port numbers (ie, http://machineb:12121/ ). 我在两者之间有一个临时无线网络,只要能够从计算机B浏览到计算机A上的共享,就可以通过标准Windows共享传输文件。我还可以浏览到计算机A上托管的网站,包括非标准端口号(即http:// machineb:12121 / )。

My goal is to create some sort of connection initiated by Machine B to Machine A which then grants me internet access on Machine A, presumably by setting up a proxy server on Machine B. However, I would need source code to the proxy server so I could build & run it locally. 我的目标是创建由机器B发起的与机器A的某种连接,然后通过在机器B上设置代理服务器来授予我对机器A的互联网访问权限。但是,我需要代理服务器的源代码,所以我可以在本地构建和运行它。

My initial thought is to create two apps, one to run on Machine B and pings the app on A (which listens for local requests on port 80), and when it receives a response (containing a URL I guess) to use a HttpWebRequest object to hit that URL and then pass that data back... but I can see this getting complicated real quick. 我最初的想法是创建两个应用程序,一个运行在机器B上,然后在A上ping该应用程序(侦听端口80上的本地请求),然后在接收到响应(包含我猜想的URL)时使用HttpWebRequest对象击中该URL,然后将该数据传回……但我可以很快地看到它变得复杂。

Any suggestions to get me started? 有什么建议可以让我入门吗?

Any number of open source web proxies will do what you're asking. 任何数量的开源Web代理都可以满足您的要求。 You can do it with apache, and mod_proxy, even. 您甚至可以使用apache和mod_proxy来完成。

However, were I your admin, and I caught you tunnelling access out of a machine I'd specifically prohibited access from/to, I would do such things to you that other programmers would weep at the very mention of your name. 但是,如果我是您的管理员,却让您从我特别禁止访问的机器上通过隧道进行访问,那么我会为您做这样的事情,以至于其他程序员在提及您的名字时都会哭泣。 Tread lightly. 轻轻踩一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM