使用任何类型的Web应用程序的东西都很新,我一直在尝试慢慢构建一个Facebook Messenger Bot.当我尝试使用ngrok时,我无法访问我给出的地址,即:
ngrok http 5000
Run Code Online (Sandbox Code Playgroud)
是我在命令行中放置的,它正在返回:
ngrok by @inconshreveable
Session Status online
Version 2.1.18
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://ea986ca5.ngrok.io -> localhost:5000
Forwarding https://ea986ca5.ngrok.io -> localhost:5000
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
Run Code Online (Sandbox Code Playgroud)
但是,当我根据Facebook开发者页面的要求获取地址" https://ea986ca5.ngrok.io "时,它说:
The connection to http://ea986ca5.ngrok.io was successfully tunneled to your
ngrok client, but the client failed to establish a connection to the local
address localhost:5000.
Make sure that a web service is running on localhost:5000 …Run Code Online (Sandbox Code Playgroud) 我正在寻找通过HTTPS隧道隧道RDP或其他二进制TCP流量的软件.因为许多客户端只允许HTTP/S(防火墙只打开端口80和443).
但是需要将RDP(和其他协议)从DMZ中的机器转发到客户端.
7
查看大型功能说明
是否有任何类型的开源或企业软件来解决这个问题?
像F5 big ip这样的解决方案存在我必须使用该软件创建连接配置的问题.如果可以通过使用api来实现这一点,那将是一个很好的解决方案.但我宁愿只使用隧道组件而不需要整个网关软件.因为我需要使用自己的软件创建隧道(1000ds),并且需要限制对允许用户的隧道访问(由会话cookie识别)
http://http-tunnel.sourceforge.net/
如果隧道客户端可能不是专用服务器而是客户端浏览器中运行的Flash的Java小程序,那么它将满足我的需求100%.
我不知道是否有办法ping我的局域网代理之外的目标只通过squid代理接受Http请求...我在某处读到了处理这种问题的一种方法是使用一个http隧道,以便代理仍将请求视为Http请求.我可以使用它来ping,例如www.google.com,否则会出现以下错误,因为防火墙拒绝了请求:
$ ping www.google.com
ping: unknown host www.google.com
Run Code Online (Sandbox Code Playgroud)
如果是这样,它是如何完成的?
我已经安装了httptunnel.Any帮助如何使用它将非常感激.
我几乎让NGrok和POW一起工作,但它正在解决POW问题,而没有深入研究在POW上运行的应用程序.
我可以访问在POW上运行的本地应用程序:
myapp.dev
Run Code Online (Sandbox Code Playgroud)
但是当我初始化Ngrok时:
/Applications/ngrok -subdomain=myapp myapp.dev:80
Run Code Online (Sandbox Code Playgroud)
作为概述这里,我收到NGrok以下的输出:
Tunnel Status online
Version 1.6/1.5
Forwarding http://myapp.ngrok.com -> 127.0.0.1:80
Forwarding https://myapp.ngrok.com -> 127.0.0.1:80
Web Interface 127.0.0.1:4040
# Conn 0
Avg Conn Time 0.00ms
Run Code Online (Sandbox Code Playgroud)
加载http://myapp.ngrok.com解析为POW,但我收到通用消息:
Pow is installed
You’re running version 0.4.1
Run Code Online (Sandbox Code Playgroud)
如何设置NGrok以解析我的.dev域名?
I am trying to write an HTTP tunnel as we want to be able to connect to a remote machine through our web application. While I am aware of the security risks involved, it's something we would like to do. It's not hosted on the internet, but on private networks, so the risk is considered low.
The basic requirement is to allow the Java Debugging tool to connect through a servlet to a machine. We have some clients that insist …
我必须实现从客户端到服务器的反向隧道.我使用以下命令使用JSCH
session.setPortForwardingR(rport, lhost, lport);
Run Code Online (Sandbox Code Playgroud)
它的工作原理(另请参阅使用JSCH Java反向SSH隧道)!
接下来我必须通过双向身份验证的HTTPS流隧道我的ssh会话:
Run Code Online (Sandbox Code Playgroud)client -> firewall -> apache https -> ssh server ----------------------> HTTPS ====================================> SSH ---------------------->
我在找
解决方案:
Run Code Online (Sandbox Code Playgroud)## Load the required modules. LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_connect_module modules/mod_proxy_connect.so ## Listen on port 8443 (in addition to other ports like 80 or 443) Listen 8443 <VirtualHost *:8443> ServerName youwebserver:8443 DocumentRoot /some/path/maybe/not/required ServerAdmin admin@example.com ## …
我连接到代理,并使用connect命令发送一些自定义标头.这是一项要求.我收到200回复.然后我尝试使用相同的连接来执行get请求(搜索附加代码为"GET {0}")但我总是得到一个错误,最终"连接关闭"(无法回想起确切的错误).从根本上说,我需要通过像https:\ www.somesecuresite.com这样的网站来访问代码.某些部分被排除在外.
using (TcpClient client = new TcpClient(proxy, proxyPort))
{
using (NetworkStream stream = client.GetStream())
{
string EncodedData = encodeUIDPWD(UserName, Password);
#region Establish Tcp tunnel
string reqString = "CONNECT {0}:{1} HTTP/1.1\r\nProxy-Authorization:Basic " + EncodedData + "\r\nHost: {2}:{3}\r\n";
reqString += "Proxy-Connection: keep-alive\r\n";
reqString += "Connection: keep-alive\r\n";
reqString += "Header1: " + header1 + "\r\n";
reqString += "Header2: " + header2 + "\r\n";
reqString += "None: " + None + "\r\n\r\n";
string rString = String.Format(reqString, myUri.Host, myUri.Port, myUri.Host, myUri.Port);
#endregion
ServicePointManager.SecurityProtocol …Run Code Online (Sandbox Code Playgroud) 所以我看到在Java 9中已经删除了通过RMI的HTTP隧道.
我们销售在Tomcat中运行的商业Java软件.我们的客户在Mac,Windows和Linux服务器上安装它.然后,公众使用Java Swing客户端界面访问该软件.它使用RMI与服务器软件进行通信.
我们的大多数客户都有防火墙阻止在80/443以外的任何端口上访问服务器.这对于Java 8及更早版本来说不是问题,它可以在动态端口上使用RMI,或在防火墙阻止访问时切换到HTTP.
但是,删除Java 9中的HTTP代理功能意味着我们的大多数客户将无法再使用我们目前构建的软件.对于我们的客户来说,为公共SSH访问配置防火墙和服务器是不切实际和不安全的,特别是对于运行Windows服务器的客户.
这是否意味着我们需要重写我们的应用程序架构以使用除RMI之外的某些网络协议?或者有没有办法将RMI保留在Java 9中?完全抛弃RMI需要完全重写面向用户的应用程序代码,并且不是一种经济高效的选择.
我的公司正在开发一个与多个网络摄像头连接的系统.我们从摄像机流式传输视频的方式是通过HTTP(主要是因为摄像机的限制以及我们希望它能够提供即插即用的行为).我注意到当我使用rtp over http选项的流时,rtp流的方式是
| X | | RTP |
| -4 | | ------- |
其中X是一个4字节的标题,以hexa中的"24 00"开头,另外2个字节是RTP数据包的长度(之后是RTP数据包).
现在我不能为我的生活弄清楚X协议是什么.我已经在两个相机品牌中看到了同样的行为 - 松下和Edimax,这表明它不是某种专有协议.
有谁知道这是什么样的协议?也许是某种HTTP隧道协议?
谢谢,
Tomer
我尝试通过需要身份验证的https连接到服务器.此外,我在中间有一个http代理,也需要身份验证.我使用ProxyAuthSecurityHandler对代理进行身份验证,使用BasicAuthSecurityHandler对服务器进行身份验证.
接收java.io.IOException:无法通过代理隧道.
Proxy returns "HTTP/1.1 407 Proxy Auth Required"
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:1525)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect (AbstractDelegateHttpsURLConnection.java:164)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:133)
at org.apache.wink.client.internal.handlers.HttpURLConnectionHandler.processRequest(HttpURLConnectionHandler.java:97)
Run Code Online (Sandbox Code Playgroud)
我注意到ProxyAuthSecurityHandler的实现期待响应代码407但是,在调试期间,由于抛出了IOException,我们永远不会到达第二部分.
代码快照:
ClientConfig configuration = new ClientConfig();
configuration.connectTimeout(timeout);
MyBasicAuthenticationSecurityHandler basicAuthProps = new MyBasicAuthenticationSecurityHandler();
basicAuthProps.setUserName(user);
basicAuthProps.setPassword(password);
configuration.handlers(basicAuthProps);
if ("true".equals(System.getProperty("setProxy"))) {
configuration.proxyHost(proxyHost);
if ((proxyPort != null) && !proxyPort.equals("")) {
configuration.proxyPort(Integer.parseInt(proxyPort));
}
MyProxyAuthSecurityHandler proxyAuthSecHandler =
new MyProxyAuthSecurityHandler();
proxyAuthSecHandler.setUserName(proxyUser);
proxyAuthSecHandler.setPassword(proxyPass);
configuration.handlers(proxyAuthSecHandler);
}
restClient = new RestClient(configuration);
// create the createResourceWithSessionCookies instance to interact with
Resource resource = getResource(loginUrl);
// Request body is empty
ClientResponse response = …Run Code Online (Sandbox Code Playgroud)