Unable to capture request responses of metro apps - proxy configuration - java

I am new to using Fiddler and I have a windows 8 metro application to be tested. I want to use fiddler to see the requests and responses from that application. I have configured fiddler by running AppContainer Loopback Exemption Utility and checking the box against my app name. Also I have unchecked all use a proxy server for my LAN (but fiddler some how checks it though) ....... Anyways I was able to see the requests sent by IE and desktop apps, but unable to see the requests of metro apps ...... Please tell me how to solve this issue

How is "java", which you tagged in your question, involved here? Metro apps are not written in Java.
Fiddler works by acting as the system's proxy. If you manually change the system's proxy configuration, Fiddler will not capture anything.
You should follow the steps described here: https://groups.google.com/forum/#!topic/httpfiddler/SsZnGxdxklg to get information which can help resolve your issue.

Related

A way to cause Android to always use http?

There is an application that I want to explore how it communicates with the server.
The problem is, that it uses https. I tried to use Fiddler with Genymotion, but for some reason, when I configured the proxy server in the emulator, nothing happened.
Then I had an idea - there is any way to cause the Android OS to always use HTTP instead of https? Because when it uses HTTP, I can just use Wireshark... (Even by creating a new custom build)
(I hope that this is the true forum to ask this question. If not, please notify me)
Thank's!

Is there a way to add custom routing rules to an Android VPN natively or with a library?

I am trying to route my traffic with custom IP routes within a VPN. I have already had a similar issue with a windows VPN client and I was able to just write a batch file that runs when launching the client and it just runs route add commands.
The problem is it seems that this is impossible to do for Android. I am aware that there is the adb approach, but it gives me permissions errors when attempting to custom add routes. Upon further research it seemed in order to change the routing rules for the IP tables I would have to root my device, this is not an option in my case.
I have looked at the VPN service on the Android Developer page, but I didn't see any way to start adding custom routes to a VPN. I also saw no libraries readily available that provide a method for additionally routing traffic. Perhaps I am missing a piece of the puzzle.
I am still learning about Android Development and this is an issue that I would like to have some input on as I will not be able to run my application through the default VPN without adding my custom rules, and I do not have the ability to change the VPN subnets around to get rid of this issue at the moment.
I had a similar problem.
Android SDK has addRoute API to add a route policy through VPN.
But there is no remove route API in the public document.
Here is the addRoute documents:
Add a network route to the VPN interface. Both IPv4 and IPv6 routes are supported. Adding a route implicitly allows traffic from that address family (i.e., IPv4 or IPv6) to be routed over the VPN.

How to debug Java Server working for localhost but not public IP

Noob question but I'm not sure where to look:
I'm running a Java Web App on a remote linux machine (Jersey RESTful API is the goal). The server successfully runs and can handle requests locally to localhost:8080/foobar but I cannot make requests to the various urls from anywhere else (For example, my laptop through a browser).
This is a simple problem I've have many times but have no idea what terms to search on google or where to look for help debugging the problem, so any leads or advice would be greatly appreciated.
Further details:
Project is code added to a Maven2 generated archetype of a Jersey Service
This is most likely caused by firewalling on the server or in front of the internal network your server is running on. Talk to your network administrators about opening a hole for port 8080, or consider using a reverse proxy on port 80 (if open) to forward requests to port 8080. See http://en.wikipedia.org/wiki/Reverse_proxy if you are not familiar with the idea of a reverse proxy or load balancers.
Change the localhost entry in your "/etc/hosts" file, with the network configs, and if server is tomcat, edit the $CATALINA_HOME/conf/server.xml to add IP the relevant <Connector> element.
Make sure you have better idea handling /etc/hosts

How do I set up Glassfish to go via a proxy server?

I have been having issues with running a Glassfish v2.1.1 instance on my local machine from within the office, where we have a proxy server for outgoing connections. My initial workaround has been to work from home.
I am calling a SOAP service on a HTTPS server outside of the company. As Glassfish is not going via the company's proxy server, I get the following error when trying to initialise my SOAP clients:
javax.xml.ws.WebServiceException: Failed to access the WSDL at: https://www.hostname.com...
and
Caused by: java.net.UnknownHostException: www.hostname.com
I have proxy environment variables set on my command line, as well as my system proxy settings all working correctly so that I can get to the WSDL with the browser. How should I configure Glassfish?
I had a lot of trouble finding an answer to this, as the topic isn't covered in a lot of detail on the web. One link told me how to configure the HTTP proxy, but mentioned nothing about HTTPS, so it took me a while to figure it out.
Open up the admin console on your Glassfish server and go to:
Application Server -> JVM Settings -> JVM Options. Click "Add JVM Option" 4 times and enter the following 4 options
-Dhttp.proxyHost=proxyhostname
-Dhttp.proxyPort=8080
-Dhttps.proxyHost=proxyhostname
-Dhttps.proxyPort=8080
Where proxyhostname and the port number are correct for your setup. Then you need to restart the server.
Note that I couldn't find any options for setting up the proxy from a PAC file, nor for proxies which require auth. In this case, you may need to install a local auth proxy handler like Authoxy for Mac OS X, which turns your localhost into a non-auth proxy and masks the authentication request from the central auth proxy.
Also, this link was good for various proxy options to the JVM:
http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
You have to explicitly set the proxy server. Several options are available depending on the Glassfish version. In general you can set the proxy by either using JVM arguments or the Glassfish Admin console. An intro for GF3 is available here (sorry for only providing a link, but I do not want to repeat all the details here).
Just to make the answer complete, if the proxy requires user name and password, set the following in Glassfish:
-Dhttp.proxyUser=someUserName
-Dhttp.proxyPassword=somePassword
The host cannot be resolved, are you sure you use a hostname resolvable by an internet DNS server or are you using something that can only be resolved from within your network or even worse, a hosts entry local to your machine?
Aside from that, the proxy server might be denying you access to some ports, but this is probably not your problem right now. If the proxy allows access to port 80, try running your Glassfish on port 80 as well if you get any connection timeout errors.

Java applet running under proxy-configured environment (corporate networks)

I am having a problem with a signed Java applet which performs simple HTTPS requests to our server (using Java's URL, Connection classes). Everything looks ok for majority of the clients. However, we do have several clients under corporate network, which are behind a proxy that requires authentication (possibly windows-logon-based authentication)). And for these clients we often hear such feedback like:
The application behaves extremely slow though our network speed is 20mbps.
20mbps connection is a huge speed for our application to work perfectly.
So my first question specifically the following:
1) Can it be the case that proxy analyses the content of our requests and thus impacts the performance of the app. And could it be only a Java-specific problem ?
The next part is about Java and Java applets specifically.
From forums I know there is a problem with Java selecting the right proxy configured in Browser. Sometimes Java applet fails to detect the proxy configured in IE, and the only solution is to configure it also in Java's Control Panel.
Having said this, the next question is:
2) Taking into account that direct connection for the corporate clients is not allowed and Java Control Panel is not properly configured, could that be the case that Java plugin selects another - wrong proxy, thru which it eventually access to the servers and thus resulting very low performance ?
I also have tried to use Apache's HttpClient (http://hc.apache.org/httpcomponents-client-ga/), to check how it performs under such environment. I have configured the client as specified in Apache tutorial to automatically get the JRE's proxy:
httpclient = new DefaultHttpClient();
ProxySelectorRoutePlanner routePlanner = new ProxySelectorRoutePlanner(
httpclient.getConnectionManager().getSchemeRegistry(),
ProxySelector.getDefault());
httpclient.setRoutePlanner(routePlanner);
And what we faced is an authentication required error (407) when we try to execute requests via Apache's httpclient. Specifically407 proxy authentication required. the ISA server requires
authorisation to fulfill the request
So the last question is about this differences between Apache and Java's client.
3) How Java Applet chooses the proxy ? and How Apache Client's selection logic differs from that of Java's ?
Please share any strongly confirmed experience you might find out could be helpful for my situation.
Thanks in advance.
3) How Java Applet chooses the proxy ?
Default behaviour:
Applet checks control panel\java\ network\network proxy settings
and uses the proxy according to the configuration in there.
Setting system properties for an applet does not works.
i.e:
System.setProperty("java.net.useSystemProxies","true");
System.setProperty("http.proxyHost", "1.1.1.1");
System.setProperty("http.proxyPort", "8080");
If you want to alter the proxy selection for an applet.
then you can use ProxySelector class.
also check out this question how-to-set-http-proxy-in-an-applet you may find it useful.

Categories

Resources