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

backup file format #1194

Closed
ghost opened this issue Jun 23, 2019 · 8 comments
Closed

backup file format #1194

ghost opened this issue Jun 23, 2019 · 8 comments
Labels
bug 🐛 resolved For questions or other issues

Comments

@ghost
Copy link

ghost commented Jun 23, 2019

I think better when app gives an option for backup file format.

adaway-backup.json or adaway-export file

example:

adaway >
settings >
backup file format >
(two option here) "new type (json)" or "old type"

OnePlus 5 cihazımdan FastHub kullanılarak iletildi.

@PerfectSlayer
Copy link
Contributor

Hello @xorcan

The old format is no more supported and won't be imported.
You can easily convert it if you want to the new format by wrapping it to some json structure.

I don't plan to support the old format as it doesn't offer all the features users need.
But I might offer a website or a script to convert it to the new version if some user struggle with json format (which I need to document in the wiki ...)

@ghost
Copy link
Author

ghost commented Jul 3, 2019

@PerfectSlayer OK it would be nice :)

OnePlus 5 cihazımdan FastHub kullanılarak iletildi.

@PerfectSlayer
Copy link
Contributor

Here it is: https://adaway.org/export
Thanks @AnXh3L0 for the website integration 😉

@RedWavve
Copy link

RedWavve commented Aug 6, 2019

Thank you SO MUCH for that converter.
I wanted to clean up my black&white list, and reverting to legacy format, importing into excel, adding wildcards, using "highlight duplicates" and reverting back helped a lot.

Questions (when you got time, nothing urgent!):

  • Does adding wildcards help with CPU or is it infinithesimal?
  • Is some sort of "AI" planned? Like "You blacklisted 3 subdomains of this domain, add wildcard and regroup", etc?

Thank you so much, you're litterally one of the three (TB and Magisk) reasons I go through rooting every device I own for hours <3

@PerfectSlayer
Copy link
Contributor

Thanks @RedWavve !

Wildcard is only available for white list domains. It is a limitation of the hosts file format itself.
White listing domains using willdcard will prevent the matching block rules to be saved in the hosts file. We can't put wildcard domain to block.

So in short, no AI plan or CPU impact ;)

But I might consider wildcard blocking rules in a future version of AdAway as it won't always use hosts file blocking feature. But I won't promise too much until I got a stable release 😅

@vidmo91
Copy link

vidmo91 commented Aug 15, 2019

Website converter doesn't work. I tried Edge, Firefox, Chrome on PC and Chrome on Android. Clicking buttons does nothing.
@edit:
I figure it out: it doesn't parse empty lines, you should fix that easily.
console log:
export:152 Uncaught TypeError: Cannot read property 'length' of null
at convertToModern (export:152)
at HTMLButtonElement.onclick (export:70)
@edit2:
but still there is some bug:
white spotify.com
converts to:
{
"sources": [],
"blocked": [],
"allowed": [
{
"host": "tify.com*",
"enabled": true
}
],
"redirected": []
}

@RedWavve
Copy link

RedWavve commented Aug 19, 2019

There must have been something wrong in the way you copy/pasted.

white spotify.com does convert without a problem
Annotation-2019-08-19-100006

Remember:

  • Always INPUT in MODERN the TOTAL FILE
  • If you input in LEGACY one line, then INSERT the line in your JSON

@Vankog Vankog added bug 🐛 resolved For questions or other issues labels Aug 19, 2019
@PerfectSlayer
Copy link
Contributor

@vidmo91 I can confirm your example is working.
Could you check you refresh the page and do not have an old js in cache?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 resolved For questions or other issues
Projects
None yet
Development

No branches or pull requests

4 participants