Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding HTTPS connection to bundle for Android #832

Open
unamed000 opened this issue Nov 26, 2024 · 3 comments
Open

Adding HTTPS connection to bundle for Android #832

unamed000 opened this issue Nov 26, 2024 · 3 comments

Comments

@unamed000
Copy link

Introduction

We're building a React Native hosting service that allow external developers to access the pre-built engine to make their own stuff.

This requires that the native app connect to custom hostname and ports

Details

In iOS, we're able to connect to a React Native hosting via HTTPS and WSS. Problem is with Android, there is no way i can figure out to do that for now.

The only way in Android at the moment was to set the "debug_http_host", which can change the "hostname" and the "port".

The problem is in Android it will always try to point to "HTTP" in the DevServerHelper.

Discussion points

  • Support Android for being able to connect to HTTPS, instead of only HTTP.
@cortinico
Copy link
Member

We're building a React Native hosting service that allow external developers to access the pre-built engine to make their own stuff.

This requires that the native app connect to custom hostname and ports

I'm not entirely sure what you're trying to do as this description is a bit too streamlined.

You can already override the hostname and port in React Native in a number of ways.

@unamed000
Copy link
Author

unamed000 commented Dec 4, 2024

@cortinico
Yes it can point to custom hostname and port.

The problem is we're hosting on TLS, which should be something like https://example.com, not http://example.com

That's a problem to a security concern since we're hosting the react native bundle on a remote server.

In iOS, when you provide the entire URL with https, it's automatically know about the TLS, Hostname and PORT.

In Android, it's different that we have to workaround by defining hostname, port.... (via debug_http_host) The problem is when defining hostname, it just take example.com and combining with the http automatically, and currently there is no way to change it into https for now.

If you looks at the Details part on the original post, you could see the problem that i'm facing.

@cortinico
Copy link
Member

Yeah thanks for clarifying.

I see facebook/react-native#47952 has been imported and @robhogan is driving it forward which should unblock this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants