-
Notifications
You must be signed in to change notification settings - Fork 179
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
LAN connection to server. #3390
Comments
Not a developer here, but I don't understand what you mean by LAN server? Are you referring to a connection to a server running on an unencrypted http port instead of https? |
I think #1793 was resolved for most use cases by element-hq/element-android#3166 ~3 years ago? This is not an Element limitation per-se, recent versions of Android don't allow blanket exceptions (or at least didn't 3 years ago when I looked at this). I believe if you give your server a domain name from the mentioned list you should be able to connect as you desire. When I looked, the only way Android would allow this for private IPs would be to literally add each possible private IP individually to that list, which is clearly distasteful. If you have found a way Android can do this in recent times, I think everyone would be open to a better solution. |
Yes, http connection, which is encrypted by VPN connection, so I don't need to use TLS (private family server). |
I patched app by changing here |
So, you actually can allow http connections, if you want, as android doc says. It's not recommended, but you can. https://developer.android.com/privacy-and-security/security-config#CleartextTrafficPermitted |
Yes, you can allow cleartext traffic from a technical point of view, but I doubt this is going to happen for 2 reasons:
I also run a small family server, and thanks to Letsencrypt, getting valid TLS certs is easy and free in manynsetups. Again, I am no dev, I do see your usecase and it is a valid one. But given the above, I am pretty sure that switch can not be made in general and could not be distributed in the Play Store. |
I don't have domain name (I don't need it, and don't want to buy for private family server), so I can't get cert from Let's Encrypt. |
Hello. Did you try either
In both cases, you don't need domain from external provider. I just tested on my end as I am starting to use Element X for the first time. I have only self signed certs and local domain pointing to local address. So I don't use external CAs like lets encrypt or haven't bought a domain. It seems to work fine. To login I enter https://dietpi.lan:SYNAPSE_PORT I used latest development build version 0.65 (unreleased yet) I will have to test at some point if TLS is enabled since I am using .lan. |
I know about local dns and self-signed certs. I don't need them in my enviroment AT ALL, so it's basicly I need to setup them, just beacause ONE of MANY matrix clients only on specific platform can't use http connections. And, other clients on android, which can be downloaded from google play, can connect by http. Element can connect by http on other platforms. I will try to find a solution by myself, because this will create problems with many non-standard use-cases, such as overlay networks over TCP/IP with encryption on protocol level. (adding their domain systems, if it exsists at all, manually for each of them will be impossible) |
Your use case
On android app you can't use lan server (or server, which is under VPN), and this is really annoying, while on PC and iOS I can connect. This issue comes from here https://github.com/element-hq/element-x-android/blob/develop/app/src/main/res/xml/network_security_config.xml. Network config is the same as on previous app. More details here: element-hq/element-android#1793.
Have you considered any alternatives?
Personally, I rebuilt the app with hint by @tobymurray suggested here element-hq/element-android#1793 (comment). Enabled http by changing
<base-config cleartextTrafficPermitted="false" />
here from false to true. May be not the best solution, as I'm not android developer, only know java and basic intuition.Additional context
No response
Are you willing to provide a PR?
No
The text was updated successfully, but these errors were encountered: