Possible to use VpnService implementation to capture and send packets?

前端 未结 2 1871
刺人心
刺人心 2020-12-13 16:57

I\'m considering the possibility of using the new android (4.0) VpnService interface to implement simple packet capture and analysis. Does anyone know if it\'s possible to t

2条回答
  •  渐次进展
    2020-12-13 17:23

    tPacketCapture creates a second socket to the remote machine to forward the packets. I have looked at tPacketCapture using adb shell netstat:

    Proto Recv-Q Send-Q Local Address              Foreign Address            State 
    tcp        0      0 192.168.1.126:49828        97.74.42.79:80             ESTABLISHED
    tcp6       0      0 ::ffff:127.0.0.1:5000      :::*                       LISTEN
    tcp6       0    522 ::ffff:10.8.0.1:50294      ::ffff:97.74.42.79:80      ESTABLISHED
    tcp6       0      0 ::ffff:192.168.1.126:34210 ::ffff:74.125.141.188:5228 ESTABLISHED
    tcp6       0      1 ::ffff:192.168.1.126:43379 ::ffff:74.125.224.174:80   CLOSE_WAIT
    tcp6       0      1 ::ffff:192.168.1.126:60217 ::ffff:74.125.239.14:443   CLOSE_WAIT
    

    Note 97.74.42.79:80 twice.

    Guess I'll have to do the same unless someone has a better idea.

提交回复
热议问题