Pages

Wednesday, September 5, 2012

Manually Setting Http, Real Host and Reverse Proxy Server for Opera Mini




Hi,
Here I will tell you a method to manually edit opera mini 6.x and 7 to set http, Real host and Reverse proxy servers. Good thing is you can do all this in your java enabled mobile itself, while sitting comfortably and listening songs! Note that this tutorial is for free http, host and reverse proxy servers. Some other modification is to be done in order to mod opera for proxy servers with username and password (although it is also very similar). I am using opera mini 7 for this tutorial. So here it starts.

Steps:

    1)  Rename opera mini’s jar file to zip file if needed. Extract the Code.class file to a separate folder (Yes, create a separate folder with easy name. Like I have created a folder name Input for this. Only Code.class file should be in that folder!)


   2) Close mini commander. Open Code.class with Byte code Editor. Four options will be displayed. Choose search. Enter the search term as setRequest. Two methods will be displayed as result. Choose <init> and click on it. (It is actually constructor).



   3) Once opened, the code of this method will be displayed. Go to second last line (just before return) .Hit centre key to make space for a new line. Now you have to enter code for adding desired proxy server in this new line space. Here is the code to set server:
aload_0
getfield Code/Code Ljavax/microedition/io/HttpConnection;
ldc "X-Forwarded-For"
ldc "100.100.100.100:8080"
invokeinterface javax/microedition/io/HttpConnection/setRequestProperty(Ljava/lang/String;Ljava/lang/String;)V 3 
   
   Here, “X-Forwarded-For” is the packet used to set reverse proxy, and 100.100.100.100:8080    is the proxy server to be set as reverse proxy. If you want to set http server, then in place of X-Forwarded-For, use “X-Online-Host”; and for Simple Real Host, use “Host”. So, the headers and their set proxy are:

Http-> X-Online-Host
Real Host-> Host
Reverse Proxy-> X-Forwarded-For

After writing, adjust the spacing in the manner shown in screenshot:

  
   4) Press right soft key, select save. Again the 4 options will appear. This time, press options and save again. It will give notification that saving is successful.
   5) Now close byte code editor. Open preverifier. Write the location of your folder where you have placed Code.class file (“Input” in my case). Similarly select the output folder. If you have more files placed in the input folder, the time taken to complete process will increase. That’s why I said place only one Code.class file in input folder. Click on preverify, and the process will start. It will take some time to finish because it is a big file. It took a little more than 5 minutes in my s60v3 phone. After completed. It will give a success message.



   6) Now place the preverified class file from the output folder back into the opera mini using mini commander. That’s it!
Note: After you modify and save the class file from byte code editor, open it again and see if the strings of server and proxy type are set correctly. Sometimes the strings automatically get replaced by something else. In this case, open that class file, go to constant pool, search for the string that is coming automatically and change it to server and header strings.


Download Links:


5 comments:

  1. i cant insert under score if use nokia e71...any solution bro..

    ReplyDelete
    Replies
    1. Don't directly enter the text.....
      First place cursor in correct place, then click the left soft key (OK button according to application). Then default editor of your phone will open. Then you can press * to bring up symbols and insert an underscore.
      Try it.

      Delete
  2. Hіya ѵerу coοl site!! Man .. Exсellent .

    . Supеrb .. I wіll bookmaгk yοur
    webѕite аnd takе the fеeds addіtiοnаlly?
    I'm satisfied to find numerous helpful information right here within the publish, we want develop more strategies in this regard, thank you for sharing. . . . . .
    Have a look at my website Rabatte 13

    ReplyDelete
  3. why alltime it shows app eror. Is preverify very important for this task? If i dont preverify what will happen? And please check again this code.

    ReplyDelete
    Replies
    1. The code is correct :)
      Yeah preverification becomes important if you are adding new lines of code or deleting some previous code. Preverification is actually making stackmaps in java, and when number of lines of code are changed, then the stackmap is corrupted, so there is a need of making new stackmap or in short, need of preverfication.

      Delete