Using Pushy through Proxy

505 views
Skip to first unread message

Stephen Wong

unread,
May 25, 2016, 1:22:12 AM5/25/16
to pushy
Hi

I can successfully use the Pushy by using native openSSL and Proxy Server


<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-tcnative-boringssl-static</artifactId>
    <version>1.1.33.Fork16</version>
</dependency>




apnsClient.setProxyHandlerFactory(
        new Socks5ProxyHandlerFactory(
                new InetSocketAddress("my.proxy.com", 1080)));



It works fine in my proxy server and my device receives push notifications.  But when I apply this (exactly the same code, only changing the proxy settings) to another very restricted environment, where the proxy server only allow pre-defined domains to get through, the push is not successful.  I have added api.push.apple.com and api.development.push.apple.com to the allowed domains already.

Our observations are:

1. When it get through my proxy server, the log shows IP, not domain.  But the IP is correct, which is one of the resolved IP of api.push.apple.com

1463999662.088   2486 XX.XX.XX.XX TCP_MISS/200 5113 CONNECT 17.172.233.39:443 test HIER_DIRECT/17.172.233.39 -
1463999671.571   6127 XX.XX.XX.XX TCP_MISS/200 4313 CONNECT android.googleapis.com:443 test HIER_DIRECT/216.58.199.106 -

you see android is using domain to connect (through proxy) but iOS does not.


2. The system administrator from that 'restricted environment's  how me the log for the failed case :

    time: 2016-05-24 10:58:05 UTC
    CONNECT tcp://17.143.164.139:443/
      ....
    user: unauthenticated


    Again, the IP is one of the resolved IPs of api.push.apple.com


So Is it possible to use proxy through a domain instead of IP.  That 'restricted environment' is very very very strict and cannot allow looser measures.

Or any other suggestion is welcome.


Thanks

Stephen

Jon Chambers

unread,
May 25, 2016, 8:48:31 AM5/25/16
to pushy
It sounds like this more a question about how Netty (the underlying network library Pushy uses) does name resolution. I frankly don't know much about that all; it may be worth asking the Netty folks directly. I'll see what I can learn, though.

-Jon

--
Pushy is an open-source Java library for sending APNs (iOS and OS X) push notifications. Pushy is brought to you by the engineers at RelayRides.
---
You received this message because you are subscribed to the Google Groups "pushy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pushy-apns+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

j...@turo.com

unread,
Jun 6, 2016, 7:17:35 PM6/6/16
to pushy
It sounds like this might be the same thing as https://github.com/relayrides/pushy/issues/309. Does that seem plausible to you?

-Jon


On Wednesday, May 25, 2016 at 8:48:31 AM UTC-4, Jon Chambers wrote:
It sounds like this more a question about how Netty (the underlying network library Pushy uses) does name resolution. I frankly don't know much about that all; it may be worth asking the Netty folks directly. I'll see what I can learn, though.

-Jon
To unsubscribe from this group and stop receiving emails from it, send an email to pushy-apns+unsubscribe@googlegroups.com.

Jon Chambers

unread,
Jun 7, 2016, 10:26:19 PM6/7/16
to pushy
Stephen,

I think we have a fix for this issue. If you're willing to build your own copy of Pushy, would you mind giving the changes in https://github.com/relayrides/pushy/pull/311 a try and letting us know if they resolve your issue?

Thanks kindly!

-Jon

To unsubscribe from this group and stop receiving emails from it, send an email to pushy-apns+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
Pushy is an open-source Java library for sending APNs (iOS and OS X) push notifications. Pushy is brought to you by the engineers at RelayRides.
---
You received this message because you are subscribed to the Google Groups "pushy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pushy-apns+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages