0

I need to set the host for a Firebase Firestore instance and in FirebaseFirestoreSettings.Builder() I have a method setHost() which works with grpc.

But grpc doesn't support java socks currently.
How can I set a Socks5h proxy for Firebase Firestore?

FirebaseFirestoreSettings.Builder()
    .setHost("socks:///12.3.456.789:1234") //i'ts my proxy
    .builder()

I tried this: socks:///, socks5:///, socks5h:///
It didn't work, throwing a NameResolver exception.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
abbath0767
  • 946
  • 2
  • 11
  • 31

1 Answers1

0

That method in builder is not to set your proxy, but is so you can "Sets the host of the Firestore backend." https://firebase.google.com/docs/reference/android/com/google/firebase/firestore/FirebaseFirestoreSettings.Builder

I think you want to setup the proxy on your device or emulator so that the Firebase connections are proxied appropriately. Android emulator proxy setting

Scott Merritt
  • 1,284
  • 2
  • 13
  • 24
  • thx for answer, but what i ask - then i need. In my country firestore servers are partially blocked and i want for my client enable proxy, if this real. I set up proxy for OkHttpClient and connect to my api work, but several functional (chat) don't work and i search solution) – abbath0767 Apr 23 '18 at 15:33
  • Seems like a Question here had some answers, but I don't think any were conclusive: https://stackoverflow.com/questions/40133703/firebase-notification-not-received-behind-proxy – Scott Merritt Apr 23 '18 at 19:36
  • how does a sample "host of the Firestore backend." look like? – Jeffrey Nyauke Dec 10 '18 at 12:09
  • how does a sample "host of the Firestore backend." look like? – Jeffrey Nyauke Dec 10 '18 at 12:09