1. A method of optimizing mobile traffic on a mobile device connected to a server and subscribed to a public IP network, the method, comprising: hosting a first mobile application and a second mobile application; receiving a network policy originating from within a private IP network, wherein policy enforcement related to the network policy is performed on an application-by-application basis; identifying the public IP network and the private IP network accessed by mobile traffic at the mobile device; enforcing the network policy on the mobile device wherein: outgoing traffic of the first mobile application is sent to a first application server via a distributed proxy system, the distributed proxy system includes a client side proxy component on the mobile device and a server side proxy component on the first application server; and outgoing traffic of the second mobile application is sent to a second application server and bypasses the distributed proxy system; intercepting traffic for the first mobile application server using the client side component of the distributed proxy system; and determining whether (i) a network destination of outgoing traffic of the first mobile application is within the private IP network and the private IP network is owned by operator of the public IP network or (ii) the network destination is within the public IP network; performing optimization of the outgoing traffic of the first mobile application via the client side proxy component by using an optimization policy set when (i) or (ii) is affirmative, the optimization set being same for the private IP network and the public IP network; sending the outgoing traffic without performing optimization to the first application server when neither (i) nor (ii) is affirmative.