Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

curl | sh installer #1652

Closed
jedisct1 opened this issue Mar 27, 2021 · 7 comments
Closed

curl | sh installer #1652

jedisct1 opened this issue Mar 27, 2021 · 7 comments

Comments

@jedisct1
Copy link
Member

As bad as it is from a security perspective, a curl | sh installer would probably take care of the majority of installation issues.

Only required for Linux. Installation issues on other platforms are statistically insignificant.

A curl | sh can download the correct binary for the platform, find what's already listening to port 53, check for the presence of an existing half-baked dnscrypt-proxy install and remove it, and carry on with a standard test and installation procedure.

The ability to revert to the initial state is probably also necessary, even though if we can only guarantee that it will properly work right after an install.

I'm probably going to need some help with that one, since I don't have much experience with Pi-Hole and never had to do any of the complicated things people reported in order to install it.

For the install to be safe, detection of the OS, architecture, and configuration (including things people may have installed such as an already running DNS cache, or firewall rules) should be reliable. Which means quite a bit of testing in different contexts.

But this is much needed. Even if everything is not automated, and requires user interactions. At least it will ensure that people end up with a default install that runs. They can then change the configuration as they want.

@milgradesec
Copy link
Contributor

Take a look at Rclone install script https://rclone.org/install.sh

@jedisct1
Copy link
Member Author

Take a look at Rclone install script https://rclone.org/install.sh

This is a really bad example.

@ianbashford
Copy link
Contributor

@jedisct1
Can I gather some expectations from you for this?

For example - I can imagine (and have seen) a simple idea that looks for apt/apk/pacman/yay/brew etc. selects the correct package manager and installs.
Good things about this approach are that it comes into the regular upgrade of the machine and is easy to maintain by the user with theri own package manager command. It'll handle cpu architectures for us nicely.
Against would be that we need to keep tabs on all package managers but that does seem achievable, and there will be inevitable delays to the 'latest' version (with the exception of some of the rolling release linuxes perhaps).
I think I can get a prototype going fairly quickly though.

Second we could build locally -- that's a big overhead if the user doesn't have golang installed ( and we'd need to uninstall the compiler ). User is left to upgrade manually, and there are a lot of potential variables to manage.

Third I think we have unpack from a github built package -- we'd have to detect architecture to pull the right zip, unpack for different OSs. I think maybe the architecture pick is the hard part of that... the rest should be scriptable.
DIsadvantage is that we'd have to make it work with an 'upgrade' function as well as an install ( and preserve config etc. ) and that would be a manual upgrade for the user.
However, the user can also trivially upgrade to the latest version...

Any other thoughts or unmentioned implementations that you had in mind?

@jedisct1
Copy link
Member Author

Option 1 would require a lot of work, and doesn't add much value over installing the package directly.

Option 2 would not be an option for e.g. routers running OpenWRT.

Option 3 is what I had in mind.

No matter what option is chosen, the trickiest part is safely changing the DNS configuration.

@ianbashford
Copy link
Contributor

Agreed -- I think I like 3, and I think picking the arch is easier than I thought.

You're right about the changing the dns config post install... I'll do some research

@bcookatpcsd
Copy link

Not sure if I've ever said, "I wish I had an sh installer.." I never keep the stock config.. but maybe that is just me..

https://nextdns.io/install

they have an sh installer..

a few platforms/arch/revisions logic selection

@ss-o
Copy link

ss-o commented May 5, 2022

Based on description above it seems easy, but more info would help, however if someone could confirm that's all needed, than could sketch and propose. Maybe someone could help and describe what should be best-practice based install? Writing a script is not that hard when you know what you writing about. :)

@DNSCrypt DNSCrypt locked and limited conversation to collaborators Jul 3, 2022
@jedisct1 jedisct1 converted this issue into discussion #2144 Jul 3, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

5 participants