tunnel

socat: tunnel IP through TTY

北战南征 提交于 2019-11-28 17:40:54
Is it possible to get an bidirectional IP-tunnel over ttyS0-like serial (modem) devices with the socat utility? I tried to use TUN option but still can't get the result. Any suggestions are welcome :) Update: PC1: socat /dev/ttyUSB0,raw,echo=0,b57600,clocal TUN:192.168.1.1/24,up PC2: socat /dev/ttyUSB0,raw,echo=0,b57600,clocal TUN:192.168.1.2/24,up After that, I have seen tun0 interfaces with proper addresses on both ends but I can't ping one from other. Instead of that, when I send data with ping -c 1 192.168.1.1 remote socat process exits and it's tun0 device destroyed. Any suggestions?..

Simple SSH Tunnel in Java

主宰稳场 提交于 2019-11-28 04:46:18
I want to create an SSH Tunnel in Java. I noticed quite a few Java SSH libraries on another post . Before I dig into each option, maybe someone can give me some code snippets of how they did it or at least tell me which client library would work best. I only need tunneling. I won't need stuff like file transfers, terminal emulation, etc. Is there a simple few lines of code that can forward a port on the server to work on my client's localhost adapter? Ideally both client and server would be in Java, but I'll settle for just client for now. Well, as pointed out in the other question, JSch is

Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407” via https

爱⌒轻易说出口 提交于 2019-11-27 21:22:12
I am faced with a curious behaviour of java6/8. I try to tunnel through a proxy which needs basic user authentication. Doing this by the standard java Authenticator. If I try to access a https url as the first url, an exception is thrown: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required" But if I access a http URL first and then the https URL, the https access works fine. Given that code: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net

Tunneling httplib Through a Proxy

混江龙づ霸主 提交于 2019-11-27 12:37:50
问题 I am trying to figure out how to send data to a server through a proxy. I was hoping this would be possible through tor but being as tor uses SOCKS it apparently isn't possible with httplib (correct me if I am wrong) This is what I have right now import httplib con = httplib.HTTPConnection("google.com") con.set_tunnel(proxy, port) con.send("Sent Stuff") The problem is, it seems to freeze when the tunnel is set. Thanks for your help. 回答1: If you want to use http proxy, it should be like this:

PostgreSQL via SSH Tunnel

限于喜欢 提交于 2019-11-27 11:12:45
I'd like to use RazorSQL to connect to my database which is running on a remote server. I create a SSH tunnel on my localhost with the following command: ssh -L 1111:remote.server.com:5432 myuser@remote.server.com I configure my connection via RazorSQL's GUI, specifying localhost as the host and 1111 as the port. When I click on "Connect", the following error message appears: ERROR: An error occurred while trying to make a connection to the database: JDBC URL: jdbc:postgresql://localhost:1111/myuser FATAL: no pg_hba.conf entry for host "aaa.bbb.ccc.ddd", user "myuser", database "mydatabase",

Simple SSH Tunnel in Java

血红的双手。 提交于 2019-11-27 05:26:11
问题 I want to create an SSH Tunnel in Java. I noticed quite a few Java SSH libraries on another post. Before I dig into each option, maybe someone can give me some code snippets of how they did it or at least tell me which client library would work best. I only need tunneling. I won't need stuff like file transfers, terminal emulation, etc. Is there a simple few lines of code that can forward a port on the server to work on my client's localhost adapter? Ideally both client and server would be in

“Tunnel Failed” exception in BlackBerry Curve 8520

血红的双手。 提交于 2019-11-27 01:54:41
Phone model:bb curve 8520 Phone version:4.6.1.314 Carrier :airtel india APN :airtelgprs.com No username and password I am using the following code: String url="http://<address>:<port>/path;deviceside=true"; HttpConnection conn =(HttpConnection)Connector.open(url,Connector.READ_WRITE,true); int response=conn.getResponseode(); if(responsecode==HttpConnection.HTTP_OK) { //...code for handling the response... } This code is throwing a "tunnel failed " exception. I am unable to understand the reason behind it. The APN is properly defined in the phone according to the network carrier. I am able to

Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407” via https

馋奶兔 提交于 2019-11-26 20:24:13
问题 I am faced with a curious behaviour of java6/8. I try to tunnel through a proxy which needs basic user authentication. Doing this by the standard java Authenticator. If I try to access a https url as the first url, an exception is thrown: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required" But if I access a http URL first and then the https URL, the https access works fine. Given that code: import java.io.BufferedReader; import java

PostgreSQL via SSH Tunnel

核能气质少年 提交于 2019-11-26 15:31:04
问题 I'd like to use RazorSQL to connect to my database which is running on a remote server. I create a SSH tunnel on my localhost with the following command: ssh -L 1111:remote.server.com:5432 myuser@remote.server.com I configure my connection via RazorSQL's GUI, specifying localhost as the host and 1111 as the port. When I click on "Connect", the following error message appears: ERROR: An error occurred while trying to make a connection to the database: JDBC URL: jdbc:postgresql://localhost:1111

“Tunnel Failed” exception in BlackBerry Curve 8520

▼魔方 西西 提交于 2019-11-26 09:49:53
问题 Phone model:bb curve 8520 Phone version:4.6.1.314 Carrier :airtel india APN :airtelgprs.com No username and password I am using the following code: String url=\"http://<address>:<port>/path;deviceside=true\"; HttpConnection conn =(HttpConnection)Connector.open(url,Connector.READ_WRITE,true); int response=conn.getResponseode(); if(responsecode==HttpConnection.HTTP_OK) { //...code for handling the response... } This code is throwing a \"tunnel failed \" exception. I am unable to understand the