LocalVPN icon indicating copy to clipboard operation
LocalVPN copied to clipboard

A number of Exceptions from TCPInput!!

Open shathil opened this issue 8 years ago • 12 comments

Hi Thanks for sharing your solution. I have started trying your solution on my Android LG G5 device. I am getting the following exception. It would be great to point out how to avoid these exceptions.

Network read error: 173.194.222.106:443:40475 :: java.io.IOException: Connection reset by peer Network write error: 173.194.222.103:443:43385 :: java.io.IOException: Broken pipe

shathil avatar Feb 05 '17 20:02 shathil

Hi, I am facing the same problem, have you found the solution?

Imran0336 avatar Feb 20 '17 06:02 Imran0336

I found LocalVPN via GitHub (and Google), and have been fascinated to experiment with it as a packet filter.

Having read the issues, I know that you do not claim LocalVPN will run in production; but I was able to get it running with excellent performance on an Android Pixel – up to a point. As others have noted, after a while (unclear whether a certain number of packets or bytes), one of several exceptions occurs. The two most common, by far are:

TCPOutput.processACK - outputChannel.write(payloadBuffer); // IOException – broken pipe

TCPInput.processInput - readBytes = inputChannel.read(receiveBuffer); // IOException - connection reset by peer

After one of these exceptions, the main loop (in VPNService) continues to run, but packets are not processed; so the browser simply stops loading pages. Stopping and restarting the service (and all underlying threads) corrects things, and browsing is again normal – until the next exception.

I am happy to contribute to testing LocalVPN, but I was wondering whether you have already found solutions to the exceptions noted above. If you’d prefer, I would continue the discussion off-line, but I know others have been working on the same issues, so I wanted to start here.

Thanks!

plutonianmusic avatar Apr 25 '17 19:04 plutonianmusic

The project is not being actively maintained currently, but patches are welcome.

hexene avatar Apr 26 '17 00:04 hexene

Why do you no longer support the project?

AndXorr avatar Apr 26 '17 14:04 AndXorr

@shathil @plutonianmusic Did you get any solution for the connection problem? I am also facing the same problem.

nildeka avatar Mar 16 '18 15:03 nildeka

I switched to ARO (AT&T) and it is working fine. They have the opensource repository.

shathil avatar Mar 16 '18 15:03 shathil

@shathil Thanks for your reply. Could you please provide some more information about it. Thanks in advance.

nildeka avatar Mar 16 '18 16:03 nildeka

I think the problem is fragmentation. When the app send/receive packets bigger than MTU, it processes them as different packets.

ers1st avatar Apr 10 '18 15:04 ers1st

Could you elaborate or give any tip on what to modify?

adrixgc avatar Oct 30 '18 15:10 adrixgc

Hi, I am facing the same "Network read error: xxxxxxx:: java.io.IOException: Connection reset by peer " exception. May i please know how to fix this?

MayukhaCheekati avatar Feb 12 '21 18:02 MayukhaCheekati

Hi Thanks for sharing your solution. I have started trying your solution on my Android LG G5 device. I am getting the following exception. It would be great to point out how to avoid these exceptions.

Network read error: 173.194.222.106:443:40475 :: java.io.IOException: Connection reset by peer Network write error: 173.194.222.103:443:43385 :: java.io.IOException: Broken pipe

hello. i have the same problem. did you find the solution?

paraschivmanuela avatar Apr 20 '21 14:04 paraschivmanuela

I have managed this thing partially working. It is mostly related to the ByteBuffer and TCP ack handling.

shathil avatar Jul 30 '21 13:07 shathil