-
Notifications
You must be signed in to change notification settings - Fork 19
Description
My issue is to connect two computers by serial-cable. A webbrowser on system-a should communicate to a squid-proxy on system-b.
try with ser2net
I successfully created a connection with the original ser2net with following settings:
ser2net config on system-a and system-b:
2000:raw:5:/dev/ttyS0:9600 NONE 1STOPBIT 8DATABITS RTSCTS
The connection between the listening squid on port 3128 and ser2net on port 2000 on system-b is done with a script and socat:
while true; do
socat -d -d -v TCP:localhost:2000 TCP:localhost:3128
done
On system-a in a firefox-browser with the setting network.max-connections = 1, it mostly does work, but not very well... Obviously, the reason is the lack of multiple connections.
try with ser2nets
I successfully compiled ser2nets on both systems and used the same config as above. Additionally, I activated logging:
TRACEFILE:tw1:/tmp/tw-\p-\Y-\M-\D-\H:\i:\s.\U
TRACEFILE:tr1:/tmp/tr-\p-\Y-\M-\D-\H:\i:\s.\U
2000:raw:600:/dev/ttyS0:9600 NONE 1STOPBIT 8DATABITS RTSCTS tw=tw1 tr=tr1
I checked with nc an socat:
nc 127.0.0.1 2000 | cat
socat -d -d -v TCP:localhost:2000 -
...and nothing was sent to port 2000 on system-b:
But the log-file has received browser-request-data from system-a:
[D] tcps: 0 (0, 6) 6 (0, 0)
GET http://start.ubuntu.com/14.10/Google/?sourceid=hp HTTP/1.1
Host: start.ubuntu.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
tcp 6 shutdown: tcp read close
[D] tcps: 0 (0, 0)
[D] tcps: 0 (0, 6) 6 (0, 0)
CONNECT tiles.services.mozilla.com:443 HTTP/1.1
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Proxy-Connection: keep-alive
Connection: keep-alive
Host: tiles.services.mozilla.com:443
My mistake is the wrong handling with the multiple connections, I think. How do I correct connect ser2nets with squid on system-b?