Corporate proxy server integration in mobile app

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Corporate proxy server integration in mobile app
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    757
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    874
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Corporate Proxy Integration in Mobile Applications

Corporate mobile applications often operate in environments with mandatory HTTPS proxies — Zscaler, BlueCoat, Cisco Umbrella, squid. Users connect via MDM profile (Mobile Device Management) which sets system proxy settings. Application must read and use these settings, not ignore them — otherwise traffic gets blocked or bypasses corporate security policy.

How Mobile OS Passes Proxy Settings

Android: system proxy settings available via ConnectivityManager and LinkProperties. For HTTP/HTTPS — ProxyInfo with host and port fields. For PAC (Proxy Auto-Config) — script URL. OkHttp reads system proxy automatically when using OkHttpClient.Builder() without explicit proxy() — if not overridden, it uses ProxySelector.getDefault().

Problem: ProxySelector works for HTTP/HTTPS, but not WebSocket (ws://, wss://). OkHttp during HTTP upgrade to WebSocket uses proxy (CONNECT tunnel), but Proxy-Authorization must be passed separately via Authenticator.

iOS: URLSessionConfiguration.default automatically picks up system proxy from settings. But URLSession with custom URLSessionConfiguration or ephemeral configuration — doesn't. For explicit control: CFNetworkCopySystemProxySettings() (Core Foundation) or NEProxySettings via Network Extension API.

NTLM and Kerberos: Corporate Proxy Authentication

Most painful scenario — proxy requires NTLM or Kerberos authentication (Integrated Windows Authentication). Standard HTTP libraries on iOS and Android don't support NTLM out of the box.

On Android: OkHttp + ntlm-authentication library or custom Authenticator with NTLM handshake implementation. NTLM is three-step protocol: NEGOTIATE → CHALLENGE → AUTHENTICATE. Response to challenge computed from NT-password hashes, username and domain. Store credentials in AccountManager — not SharedPreferences.

On iOS: URLSession supports NTLM via URLAuthenticationChallenge with NSURLAuthenticationMethodNTLM. Implement URLSessionTaskDelegate and return URLCredential with username/password. Domain optional but some corporate proxies don't accept without it.

Kerberos (Negotiate) on mobile — rare but found in large enterprises with MS AD. On iOS: GSS-API (available via Heimdal). On Android — practically no good solution without NDK and MIT Kerberos.

SSL Inspection: Proxy Certificate Substitution

Corporate HTTPS proxy often acts as Man-in-the-Middle — decrypts TLS traffic, inspects, re-encrypts with own certificate. Device must trust corporate CA.

On MDM devices, corporate CA installs automatically via profile. For applications implementing Certificate Pinning — SSL inspection breaks it. Either disable pinning for internal endpoints, or pin to MDM certificate level (verify not leaf server certificate but chain to trusted corporate CA).

On Android 7+ user CA certificates not trusted by apps by default. For corporate applications trusting MDM-installed CA: network_security_config.xml with <certificates src="system"/> and explicit <certificates src="user"/> for development, only system for production MDM.

PAC Files: When Proxy Isn't One

Proxy Auto-Config (PAC) — JavaScript function FindProxyForURL(url, host) returning proxy or DIRECT for each URL. Corporate networks use PAC for routing: internal resources — direct, internet — via proxy.

On iOS: PAC handled by system, URLSession uses result transparently. On Android: ProxyInfo.buildPacProxy(Uri) — MDM installs it, but programmatic PAC processing in application non-trivial. For custom HTTP clients (OkHttp) need to parse and execute PAC yourself — library pac4j-proxy or JavaScript via JavaScriptEngine.

Integration Process

Start with audit: which proxy does client use, MDM solution (Intune, Jamf, MobileIron), authentication method, need for SSL-inspection bypass. This determines scope.

Basic integration (HTTP/HTTPS proxy without auth) — 1 week. NTLM + PAC + SSL inspection bypass — 3–5 weeks including testing in corporate environment.