React Native - OneSignal Proxy


https://github.com/geektimecoil/react-native-onesignal/issues/615#issuecomment-416441323

You would need to remove OneSignal from your build.gradle and you would need to manually download the Android and iOS native SDK’s (links below) and modify them to change the URL.

Once you change the URL, you’ll need to recompile both of them, compile Android SDK into a jar, and you can compile the iOS SDK into a framework or a static library, or even host it as a private cocoapod.

Nginx

  1. https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/
  2. https://vc.ru/claim/76946-servis-push-uvedomleniy-onesignal-nedostupen-v-rossii?comment=1334456

configure Nginx as a reverse proxy to proxy requests to https://onesignal.com:

  # /etc/nginx/sites-available/<MY_APP>_production

  server {
    listen 443 ssl;

    # ...

+   location /onesignal/ {
+     proxy_pass https://onesignal.com/;
+   }
  }

OneSignal-Android-SDK

OneSignal-iOS-SDK

react-native-onesignal

your application