Setting HTTP Headers in DroidVPN

Posted on February 3, 2017 @ 6:54 am

While our wiki page is still being developed I would just post it here right now so you will have a reference when creating your HTTP headers.

Intro on HTTP Headers

HTTP or "Hypertext Transfer Protocol" is used mostly by Web browsers. You can see it in your browser's address bar which starts with http://. HTTP headers allow the client(web browser) and the server to pass additional information with the request or the response. If you visit a website, your browser will send an HTTP request (eg: GET www.google.com HTTP/1.1) to the web server of the website, the web server would then send an http reply back for your request.

How does DroidVPN use HTTP Headers?

If you want to circumvent internet censorship, DroidVPN can use those HTTP headers to mimick or disguise your traffic as valid HTTP request. All you need to do is find which HTTP requests are allowed on your internet connection. For example if your university censors internet traffic and only allows certain websites to be accessed like wikipedia.com, You can create HTTP Headers that looks like requests for a wikipedia.com page but you are actually connecting to the DroidVPN servers.

The most common example is this

CONNECT [host_port] [protocol][crlf]Host: wikipedia.com[crlf][crlf]

Most censors will think that you are accessing the site wikipedia.com because of the Host header.

We will soon add a page setting for the HTTP headers so you can easily build your HTTP headers instead of manually creating them.

But right now you can use the keywords below in building your http headers. The keywords will be replaced by DroidVPN to their true value before sending the HTTP headers.

[protocol]HTTP/1.1
[host_port]Will be repleaced by the host:port of the selected server
[crlf]\r\n or Carriage Return and Linefeed
[crlf][crlf]End of HTTP Header
[ua]Randomly select a User agent from the built in list of User-agents of DroidVPN


Lets show another example which is the default HTTP header that comes with the DroidVPN software for Windows PC

CONNECT m.facebook.com@m.facebook.com / HTTP/1.1[crlf]
Host: m.facebook.com[crlf]
Connection: keep-alive[crlf]
User-Agent: [ua][crlf]
[crlf]


NOTE:DroidVPN for Android http headers should be written in one line.

To get the full list of valid HTTP headers visit this wikipedia page: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields