title: Android http Tunnel using VpnService
body: <p>I'm trying to redirect the whole android network traffic through HTTP Tunnel, and there is no tutorial or Github Repository on how to do it.</p>
  
  <p>Simply just get the host, port, username, and password from the user and tunnel the whole device to that host programmatically.</p>
  
  <p>I have configured an HTTP-Proxy server with squid, just need a client to connect to it.</p>
  
  <p>I don't want an Open-VPN solution or StrongSwan, this <a href="https://play.google.com/store/apps/details?id=com.tunnelguru.toofan" rel="noreferrer">app</a> named TOOFAN Tunnel, is doing what exactly I need, but it's only available in some countries and it is not an open-source project.</p>
  
  <p>Just need someone to show me the path or put me in the right direction, I appreciate it in advance.</p>
  
  <p>I know about Android's <a href="https://developer.android.com/reference/android/net/VpnService.html" rel="noreferrer">VpnServise</a>, and how it redirects the traffic, I just don't know to implement a socket to transfer packets through an HTTP proxy with credentials.</p>
  
  <p>I had built and tested more than 20 repositories but none worked. Some of them are:
  <a href="https://github.com/comp500/SSLSocks" rel="noreferrer">SSLSocks</a>, <a href="https://github.com/raise-isayan/TunProxy" rel="noreferrer">TunProxy</a>, <a href="https://github.com/AoEiuV020/VpnProxy" rel="noreferrer">VpnProxy</a>, <a href="https://github.com/zxc111/SmartProxy" rel="noreferrer">SmartProxy</a>, <a href="https://github.com/zeeying/NetDroidProxy" rel="noreferrer">NetDroidProxy</a>, <a href="https://github.com/hexene/LocalVPN" rel="noreferrer">LocalVPN</a>, <a href="https://github.com/lparam/xSocks-android" rel="noreferrer">xSocks-android</a>, <a href="https://github.com/xingrz/prox" rel="noreferrer">prox</a>.</p>