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

Closed
iWangJiaxiang opened this issue Oct 26, 2020 · 80 comments · Fixed by brave/brave-core#25484
Closed

Make Sync Server Url configurable in the UI #12314

iWangJiaxiang opened this issue Oct 26, 2020 · 80 comments · Fixed by brave/brave-core#25484

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...?

@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.

@bsclifton
Copy link
Member

Huge thanks to @jagadeshjai for getting this done on Desktop!

I created a version of this issue for Android. Please see and subscribe to #42570

@MadhaviSeelam
Copy link

MadhaviSeelam commented Dec 20, 2024

Verification PASSED using

Brave | 1.75.118 Chromium: 132.0.6834.57 (Official Build) nightly (64-bit)
-- | --
Revision | 7ad77ca4173af4e4eed04688bdb2f8752acd6800
OS | Windows 11 Version 24H2 (Build 26100.2314)

Case 1: Sync not enabled - Custom sync URL option is shown - PASSED
  1. Installed 1.75.118
  2. launched Brave
  3. opened brave://settings/braveSync/setup
  4. verified Sync is not enabled
  5. opened brave://settings/braveSync in a new tab
  6. confirmed Custom sync URL option/tab with text field is shown
  7. entered https://sync-v2.brave.com/v2 in the text field
  8. clicked Relaunch button
  9. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 but it's editable and not grayed out
step 4 step 6 step 7-8 step 9
Image Image Image Image
Case 2: Sync enabled - Custom sync URL option is shown - PASSED
  1. continue from Case 1:
    -https://sync-v2.brave.com/v2 URL is shown in Custom sync URL field
  2. clicked Start using sync tab above `Custom sync URL
  3. clicked Start a new Sync Chain >> Computer >> ok
  4. verified page navigated to Sync page
  5. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 but it's editable and not grayed out
  6. clicked Manage your synced devices tab
  7. confirmed Sync enabled
step 1 step 2 step 5 step 7
Image Image Image Image
Case 3: Leave existing sync and rejoin the Sync - PASSED
  1. New profile
  2. opened brave://settings/braveSync
  3. confirmed Custom sync URL with text field option is shown in brave://settings/braveSync
  4. entered https://sync-v2.brave.com/v2 in the text field and pressed enter
  5. clicked Relaunch
  6. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 but it's editable and not grayed out
  7. clicked Start using Sync tab above Custom sync URL
  8. clicked I have a Sync Code
  9. joined sync from another device
  10. clicked Ok button
  11. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 and grayed out
  12. clicked Manage your synced devices
  13. clicked Leave Sync Chain
  14. page is navigated to Sync page
  15. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 but not grayed out and editable
  16. verified sync chain is not enabled
  17. join the sync chain again by clicking Start a new Sync Chain
  18. confirmed Custom Sync URL field is still populated with the set value https://sync-v2.brave.com/v2 and grayed out
  19. clicked Manage your synced devices tab
  20. verified Sync chain enabled as expected
step 3 step 4 step 6 step 8 step 10 step 11 step 12 step 14 step 15 step 17 step 18 step 21
Image Image Image Image Image Image Image Image Image Image Image Image
Case 4: Two profiles - Sync with Desktop profile and Mobile profiles - PASSED
  1. New Profile
  2. import from Google Chrome >>Select all >> Import >>Finish
  3. confirmed 3 profiles are shown in the Profile manager
  4. opened brave://settings/braveSync for Profile 1 (Work)
  5. confirmed Custom sync URL with text field option is shown in brave://settings/braveSync
  6. opened Google Chrome Profile 2 via Profile manager
  7. opened brave://settings/braveSync
  8. confirmed Custom sync URL with text field option is shown in brave://settings/braveSync
  9. entered https://sync-v2.brave.com/v2 in the text field
  10. clicked Relaunch button
  11. confirmed https://sync-v2.brave.com/v2 is shown in the text field
  12. clicked Start using sync tab above Custom sync URL tab
  13. clicked Start a new Sync Chain to start Sync chain
  14. confirmed Sync page shows Manage your synced devices tab and Custom sync URL text field is grayed out
  15. clicked Manage your synced devices
  16. clicked Add New Device to Android phone by scanning sync QR code
  17. verified Bookmarks synced as expected
  18. Opened Profile 1 in the Profile manger
  19. opened brave://settings/braveSync
  20. entered https://sync-v2.brave.com/v2 in the text field
  21. clicked Relaunch
  22. confirmed Custom Sync URL field is populated with the set value but not grayed out and editable
  23. clicked Start using sync >> I have a Sync code
  24. entered Sync code from Google Chrome Profile 2
  25. verified sync enabled for Profile 1 (Work) as expected
  26. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 and grayed out and not editable
  27. opened brave://sync-internals and no errors shown
step 3 step 5 step 8 step 11 step 13 step 14 step 17 step 19 step 20 step 22 step 23 step 25 step 26 step 27
Image Image Image Image Image Image Image Image Image Image Image Image Image Image
Case5: If sync already turned ON and Custom sync URL is empty then the Custom sync URL option should be hidden - PASSED
  1. New profile
  2. opened brave://settings/braveSync
  3. confirmed Custom sync URL with text field option is shown in brave://settings/braveSync
  4. leave `Custom sync URL text field blank
  5. clicked Start using sync tab
  6. clicked Start a new Sync chain >> Computer >> OK
  7. confirmed user is navigated to Sync page
  8. confirmed Custom sync URL tab and text field is hidden
  9. clicked Manage your synced devices
  10. verified sync chain is still enabled
  11. clicked Delete Sync Account
  12. clicked back arrow for Start using sync
  13. entered https://sync-v2.brave.com/v2 in the Custom sync URL
  14. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 but it's editable and not grayed out
  15. clicked Start a new Sync chain >> Computer >>OK
  16. page navigated and confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 and grayed out
  17. clicked Manage your synced devices tab
  18. verified Sync chain enabled as expected
step 3 step 6 step 8 step 10 step 11 step 12 step 13 step 14 step 16 step 18
Image Image Image Image Image Image Image Image Image Image
Case 6: Upgrade - Sync not enabled - PASSED
  1. Installed 1.73.104
  2. launched Brave
  3. opened brave://settings/braveSync in a new tab
  4. closed Brave
  5. renamed the profile Brave-Browser-Nightly
  6. installed 1.75.118
  7. launched Brave
  8. opened brave://settings/braveSync
  9. confirmed Custom sync URL text field is shown
  10. entered https://sync-v2.brave.com/v2 and pressed Enter
  11. clicked Relaunch
  12. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 and it's editable and not grayed out
  13. clicked Start using sync tab
  14. clicked Start a new Sync Chain >> Computer >> OK
  15. confirmed Custom Sync URL field is populated with the set value https://sync-v2.brave.com/v2 and is grayed out
  16. opened brave://settings/braveSync/setup and Sync devices page shown
step 3 step 4 step 8 step 12 step 13 step 15 step 16
Image Image Image Image Image Image Image
Case 7: Upgrade - If sync already turned ON upon upgrade, then the Custom sync URL option is hidden - PASSED
  1. Installed 1.73.104
  2. launched Brave
  3. opened brave://settings/braveSync in a new tab
  4. clicked Start using sync tab
  5. clicked Start a new Sync Chain >>Computer >>Ok
  6. navigated to Sync page
  7. closed Brave and renamed the profile Brave-Browser-Nightly
  8. installed 1.75.118
  9. launched Brave
  10. opened brave://settings/braveSync
  11. confirmed Custom sync URL tab with text field is hidden
  12. clicked Manage your synced devices tab
  13. verified sync chain is still enabled
step 1 step 3 step 4 step 6 step 8 step 11 step 13
Image Image Image Image Image Image Image

@LaurenWags
Copy link
Member

Changing to QA/No and release-notes/exclude as this was reverted with brave/brave-core#27136. Issue to reimplement is being tracked with #43181.

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

Successfully merging a pull request may close this issue.