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

Make Sync Server Url configurable in the UI #12314

Open
iWangJiaxiang opened this issue Oct 26, 2020 · 77 comments · May be fixed by brave/brave-core#25484
Open

Make Sync Server Url configurable in the UI #12314

iWangJiaxiang opened this issue Oct 26, 2020 · 77 comments · May be fixed by brave/brave-core#25484
Labels
feature/settings feature/sync feature-request OS/Android Fixes related to Android browser functionality OS/Desktop priority/P5 Not scheduled. Don't anticipate work on this any time soon.

Comments

@iWangJiaxiang
Copy link

iWangJiaxiang commented Oct 26, 2020

Staff edit (by @bsclifton)

Custom sync URLs are supported. You can use the command line flag:
--sync-url=https://sync-v2.brave.com/v2

And replace https://sync-v2.brave.com/v2 with the server of your choosing. Our server implementation is open and can be found here:
https://github.com/brave/go-sync

The ask for this issue is to offer a place in the UI to edit the URL.

Description

To protect user data, it is important to support self-hosted sync service for advanced/professional users, for example, those users using NAS/HomeLab/HomeServer. Now the self-hosted feature of Brave sync server v2 is supported according to Issue #51 · brave/go-sync. The next step is supporting custom sync server url in brave-browser! Then the brave browser solution could be important part of homelab stack list!

@iWangJiaxiang iWangJiaxiang added OS/Android Fixes related to Android browser functionality OS/Desktop labels Oct 26, 2020
@bsclifton
Copy link
Member

@iWangJiaxiang this should already be possible - you can edit the shortcut (or however you launch Brave) to provide a different URL. The argument looks like this:
--sync-url=https://sync-v2.brave.com/v2

@iWangJiaxiang
Copy link
Author

iWangJiaxiang commented Oct 26, 2020

@bsclifton Thanks for your quick reply!

Do mobile clients (Android/IOS) support this way?

@bsclifton
Copy link
Member

@iWangJiaxiang good question - they support this, but there is no way to set this. I'll remove Desktop label from this issue and we can use it to track being able to change this server somehow

@llucax
Copy link

llucax commented Oct 27, 2020

Is the brave sync server open source too? If so, where can I find it?

If Brave is still close enough to Chrome, it might be possible to still set the sync server for mobile (although using a very user-unfriendly way, I hope Brave doesn't follow this pointless policy of not allowing users to easily set up a custom sync server and eventually implements it in a more accessible way, even if it is still hidden in some advance configuration option).

@bsclifton
Copy link
Member

@llucax the code for the server is open source and can be found here:
https://github.com/brave/go-sync

@captainepoch
Copy link

this should already be possible - you can edit the shortcut (or however you launch Brave) to provide a different URL

Could it be possible to add an option into the Privacy & Security section, or when you're going to setup the sync for the first time? Firefox allows you to change the sync server URL in the about:config, which is easy enough to setup your own sync server.

I kow the about:config doesn't exist in Brave, but something easier than changing in the params of the launcher would be great!

@AlexeyBarabash AlexeyBarabash added the priority/P5 Not scheduled. Don't anticipate work on this any time soon. label Nov 19, 2020
@fastman
Copy link

fastman commented Dec 16, 2020

yup, It'd be great to have this on both mobile and desktop!

@claudio4
Copy link

claudio4 commented Mar 15, 2021

this should already be possible - you can edit the shortcut (or however you launch Brave) to provide a different URL

Could it be possible to add an option into the Privacy & Security section, or when you're going to setup the sync for the first time? Firefox allows you to change the sync server URL in the about:config, which is easy enough to setup your own sync server.

I kow the about:config doesn't exist in Brave, but something easier than changing in the params of the launcher would be great!

Actually, Brave has brave://flags/ (and a few more, full list in brave://chrome-urls/) , it might may be possible to add it there.

@FlavioSantoro92
Copy link

News about that? On mobile would be great to edit, I don't want to fork the repo and build each time only to change the sync url

@Joshndroid
Copy link

Still nothing as yet? Would love to see this supported in the android app.

@DaCHack
Copy link

DaCHack commented Aug 7, 2021

@iWangJiaxiang this should already be possible - you can edit the shortcut (or however you launch Brave) to provide a different URL. The argument looks like this:
--sync-url=https://sync-v2.brave.com/v2

Hi,

I started the Sync server via docker on my local system as described in the README.md, but when I start brave with brave-browser --sync-url=http://127.0.0.1:8295, brave://sync-internals/ gives me a 404 HTTP error and with https it gives me an ERR_SSL_PROTOCOL_ERROR.

[27504:27516:0807/232750.493541:ERROR:ssl_client_socket_impl.cc(981)] handshake failed; returned -1, SSL error code 1, net_error -107

Any idea what I am doing wrong?

Many thanks!

@bsclifton
Copy link
Member

cc: @yrliou

@yrliou
Copy link
Member

yrliou commented Aug 13, 2021

@DaCapitalist Could you try --sync-url=“http://localhost:8295/v2”, and open brave://sync-internals/ to verify Server URL is set to the value as expected?

@DaCHack
Copy link

DaCHack commented Aug 14, 2021

@DaCapitalist Could you try --sync-url=“http://localhost:8295/v2”, and open brave://sync-internals/ to verify Server URL is set to the value as expected?

@yrliou Many thanks. It works with --sync-url=http://localhost:8295/v2 (without the quotation marks!)
But is the data exchange now HTTPS encrypted or not? I thought this should be encrypted?

Thanks!

@yrliou
Copy link
Member

yrliou commented Aug 14, 2021

@DaCapitalist Glad it works now. Your HTTP request & response itself between your browser and your local server is not encrypted, but the actual sync data that being passed in the request and response is always encrypted and will be decrypted on the client side only. (p.s.: meta data is not encrypted but that shouldn't be an issue.)

@DaCHack
Copy link

DaCHack commented Aug 15, 2021

Okay, many thanks.
This is just awesome!
Only missing piece now is to set this URL also on mobile apps (especially iOS).
Waiting for this!

@DaCHack
Copy link

DaCHack commented Oct 2, 2021

@iWangJiaxiang good question - they support this, but there is no way to set this. I'll remove Desktop label from this issue and we can use it to track being able to change this server somehow

Should‘t this be a Basic UI change in all clients and not only mobile/android? Thus, I would vote for keeping this also in the desktop (and iOS) backlog. Funktionality should be already existing in Chromium so we only need a setting in the UI to change the Variable. E.g. As @claudio4 suggested. Plus, since firefox is already offering this setting I suggest to increase the priority. What do you think?

@DaCHack
Copy link

DaCHack commented Feb 1, 2022

4 months after our discussion I wanted to bring this up again.
How are we doing with this UI feature for desktop and mobile?

@JulienSambre
Copy link

Hi!

Same question here : this is the only thing that I need to migrate my family browsers to Brave (from Firefox + self-hosted sync server)

@ln-12
Copy link

ln-12 commented Nov 17, 2022

Hey @bsclifton, is there any update on this? For me, it would be enough to set a URL once (e.g. via brave://flags/) on both mobile and desktop. Having it in the regular UI would be awesome, but having no option at all is a great pity. Is there a possibility yet?

@metal450
Copy link

Like others above, the only thing that keeps me on Firefox is Brave's lack of a proper option. As mentioned in #20431 (comment), using a command-line arg isn't really "safe", as if it's ever missed/forgotten, the browser will just silently publish your data on the public server. Is making this available in brave://flags/ really a large undertaking...?

@metal450
Copy link

I don't see it officially comming any time soon. So discussing any available method to use our selfhosted go-sync server in brave is valid i.g.

Yeah, fair enough.

It's still hard to comprehend why the official maintainers seem to have no interest here - it's clearly it's in high demand (out of 5k issues, this is on the very first page of most-commented) & has been opened for more than 3 years.

Really wish I could one day switch from Firefox.

@NicholasFlamy
Copy link

NicholasFlamy commented Mar 14, 2024

Seriously, why does no Chromium browser want to allow this, the first Chromium browser that will add this is gonna have a huge influx of users.

@GanerCodes
Copy link

could someone like, set up a docker image that manually changes the URL to some environment variable and builds the APK? im rlly sick of this problem

@NicholasFlamy
Copy link

NicholasFlamy commented Mar 14, 2024

could someone like, set up a docker image that manually changes the URL to some environment variable and builds the APK? im rlly sick of this problem

Good idea, it's just that the current solution is outdated and to merge with the latest would require a bit of work. I already set up an autobuild docker container using GitHub actions on my brave/go-sync fork and maybe I'll try making and apk autobuild for the actual app. I just don't have time right now.

@NicholasFlamy
Copy link

I've almost done it. My main concern now is that my autobuilds would be based on the master branch. So basically nightly. That's annoying. And to change that I'd have to manually change the branch every major release.

@krokwen
Copy link

krokwen commented Mar 15, 2024

I've almost done it. My main concern now is that my autobuilds would be based on the master branch. So basically nightly. That's annoying. And to change that I'd have to manually change the branch every major release.

you can write a small script in python or even shell oneliner with curl+jq to obtain the latest release tag from github api. it's literally one request

@NicholasFlamy
Copy link

NicholasFlamy commented Mar 15, 2024

I've almost done it. My main concern now is that my autobuilds would be based on the master branch. So basically nightly. That's annoying. And to change that I'd have to manually change the branch every major release.

you can write a small script in python or even shell oneliner with curl+jq to obtain the latest release tag from github api. it's literally one request

Thanks for letting me know, I'm gonna finish making it work with master and then figure that out. The main reason I'm worried about that is because each major release there are enough commits that it could require me to manually merge the branches due to merge conflicts.

@Fmstrat
Copy link

Fmstrat commented Mar 15, 2024

Why do people say this requires root? I put a link above that does not require root.

I also stopped pursuing my build once I realized that was the case. And now that Firefox Nightly has real tabs in the UI for tablet, I'm going that route.

@NicholasFlamy
Copy link

NicholasFlamy commented Mar 15, 2024

Why do people say this requires root? I put a link above that does not require root.

I also stopped pursuing my build once I realized that was the case. And now that Firefox Nightly has real tabs in the UI for tablet, I'm going that route.

/data/local/ requires root, /data/local/tmp/ does not.
Edit: But to use the non-root directory it requires enabling a flag for command line args on non-root which makes a popup every time you open a tab.

@NicholasFlamy
Copy link

I could submit a PR for this but I don't want to if Brave would ignore it.

@NicholasFlamy
Copy link

So I made an org for what I have so far. If anyone more knowledgeable than me would like to help with the autbuilds, please PR, I'm pretty clueless.
https://github.com/flamy-brave

@krokwen if you have time then if you could make the GitHub action to use the current release I might be able to get the rest.

@NicholasFlamy
Copy link

Also, I made a sync server autobuild, it should be as simple as running the docker-compose.yml as is mentioned at the beginning of the README.MD.

https://github.com/flamy-brave/brave-sync-docker-autobuild

@NicholasFlamy
Copy link

I also stopped pursuing my build once I realized that was the case.

Are you talking about the fact that it's from master? There's a way to mitigate that.

@NicholasFlamy
Copy link

NicholasFlamy commented Mar 19, 2024

If someone knows how I'd appreciate if they could make a GitHub action that builds Brave Browser. If someone does I'll self-host a GitHub Action runner so that it won't run out of space due to Chromium source code being so large. PR this: https://github.com/flamy-brave/brave-browser-custom-sync/blob/master/.github/workflows/autobuild.yml

Also, since self-hosted runners can carry over data, preferably, the action would git pull if git clone fails due to the repo already being cloned, so that it won't have to download 30GB+ of Chromium source every time.

@Fmstrat
Copy link

Fmstrat commented Mar 20, 2024

Are you talking about the fact that it's from master? There's a way to mitigate that.

No, I stopped because I realized I had done the UI work and that they'd never merge it in, and because I figured out I could use the custom startup to enable the feature.

While a config option for self hosted sync on Android would be nice, it's trivial to do it via the file config and CLI, even without root.

@NicholasFlamy
Copy link

Are you talking about the fact that it's from master? There's a way to mitigate that.

No, I stopped because I realized I had done the UI work and that they'd never merge it in, and because I figured out I could use the custom startup to enable the feature.

While a config option for self hosted sync on Android would be nice, it's trivial to do it via the file config and CLI, even without root.

I would still like a flag for it to prevent this:
Screenshot_20240313_203329_Chrome
Screenshot_20240313_204106_Thorium

@NicholasFlamy
Copy link

NicholasFlamy commented Apr 9, 2024 via email

@ln-12
Copy link

ln-12 commented Apr 9, 2024 via email

@NicholasFlamy
Copy link

NicholasFlamy commented Apr 9, 2024 via email

@plangin
Copy link

plangin commented Jul 3, 2024

Wow, almost 4 years.

This issue and #11769 shows that the devs do not care much about sync.

@bsclifton
Copy link
Member

bsclifton commented Jul 8, 2024

Hi folks - this issue has been marked as a P5 (priority 5; Not scheduled. Don't anticipate work on this any time soon.) for the past 4 years.

We absolutely do care about sync. Our sync should be working - please open an issue if you are experiencing a problem. As shared in the second post here, you can use a custom URL:
#12314 (comment)

You can also stand up your own sync server- see #12314 (comment)

The ask here (for this issue) is to have something in the UI where an advanced user can point at their own sync server. I think the proper place would be a brave://flags entry - because inside brave://settings may be confusing for regular users. If someone was wanting to get started on this, there are some good example pull requests where a brave://flags entry has been added.

@bsclifton bsclifton changed the title Custom Sync Server Url Support Required Make Sync Server Url configurable in the UI Jul 8, 2024
@GanerCodes
Copy link

Hi folks - this issue has been marked as a P5 (priority 5; Not scheduled. Don't anticipate work on this any time soon.) for the past 4 years.

Why? this isn't a trivial matter as it's currently impossible to self host a sync server for one's phone as you can't set launch flags

@NicholasFlamy
Copy link

Hi folks - this issue has been marked as a P5 (priority 5; Not scheduled. Don't anticipate work on this any time soon.) for the past 4 years.

Why? this isn't a trivial matter as it's currently impossible to self host a sync server for one's phone as you can't set launch flags

*on iPhone. On Android you can do it, even without root, but it makes the browser not very usable. That or you use the QA Preferences which I don't think you're officially supposed to use but I do.

@metal450
Copy link

@bsclifton

As shared in the second post here, you can use a custom URL:
#12314 (comment)

As discussed in many of the comments:

this issue has been marked as a P5 (priority 5; Not scheduled. Don't anticipate work on this any time soon.) for the past 4 years.

Yeah not following the rationale there at all.

  • Out of more than 7,000 issues currently on github, this is currently the 4th most commented. Issues with way less interest/engagement somehow have higher priority (?)
  • Likewise many issues that were raised way later than this one continue to jump in front of it & get addressed first.

Rather than just stating it has no priority, care to state why that's the case? Clearly your priority is not based on order (this is old) nor on popularity (this is popular). So what rationale could there be for leaving this at P5, continuing to ignore it, while fixing other lower-interest, more-recent issues?

We absolutely do care about sync.

Not about private/self-hosted sync, evidently

Our sync should be working

Not with a self-hosted server.

please open an issue if you are experiencing a problem.

What? That's exactly what this is. This issue was opened 4 years ago to raise a problem that many people are experiencing.

@NicholasFlamy
Copy link

Why do people say this requires root? I put a link above that does not require root.
I also stopped pursuing my build once I realized that was the case. And now that Firefox Nightly has real tabs in the UI for tablet, I'm going that route.

/data/local/ requires root, /data/local/tmp/ does not. Edit: But to use the non-root directory it requires enabling a flag for command line args on non-root which makes a popup every time you open a tab.

FYI, I don't think this works anymore, permission denied on Android 14 OneUI 6.1 Samsung S22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/settings feature/sync feature-request OS/Android Fixes related to Android browser functionality OS/Desktop priority/P5 Not scheduled. Don't anticipate work on this any time soon.
Projects
None yet
Development

Successfully merging a pull request may close this issue.