-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add the ability to manage entries added from other applications #61
Comments
@Fooughhy thanks for taking the time to add this issue. AFAIK the OS uses only one hosts file. What
Then you can do all things If you have a I'm not sure if I answered your question correctly. Is this info helpful? I've updated the docs to change (Note: There is a |
Hi @guumaster ! Thanks for the reply! What I meant was maybe more of an added functionality to hostctl, to be able to EASILY use and organize several hosts files. So that I can create a hosts.beacon file and have hostctl be able to incorporate that one into the regular one. Essentially use a pool of files, and run an "update" command for example to fetch the entries in these files. I could maybe assoiciate a profile with a file. This still doesn't really make my original issue easier though, as what I now did was to remove the entries from the hosts file by using the original tool (Anti-Beacon) and reset hostctl. Then I added it through Anti-Beacon again, ran But I see your point that I can have another file 'hosts.beacon' which I add these entries from. But I still have to rename 'hosts.beacon' to 'hosts' to be able to manage the entries in that file (as the tool only uses the default 'hosts' file. I know this is a very specific issue, I just wanted to describe it to see if there was a possibility for a solution, or if the functionality was already there but I just couldn't find it. |
Is the anti-beacon tool rewriting Can you describe your ideal layout of files and ideal way of working of |
@guumaster I think he's talking about #31, the ability to define a master profile from various profiles. @Fooughhy, you conflict between describing your personal issue and your proposal. I think you should have used a far more minimal version of your personal issue to illustrate your feature request. And, perhaps, link to this anti-beacon tool. Could you focus on your proposal for a second (unless you don't have a concrete proposal)? |
@guumaster The anti-beacon tool is only adding entries, and it will recognize then even if I move them around. @smhmd Yes, I know that my vision isn't clear and I didn't have that clear of a solution in mind when I wrote this. One problem, which maybe isn't the most important one, is that it would make the organization clearer if we were able to EASILY update the hosts file using the profiles. If the profiles contained (optionally) more information such as a file, or list of files, we may be able to simply use a command such as "update" to fetch new entries from these files when we add things to them. Everything in this tool is quite manual. This would make it more automatic. Another problem is the organization of new entries. I have now updated my hosts file and divided everything into profiles. But when I use a tool, e.g Anti-Beacon, it will add new entries which are not in a profile. These new entries have to be manually added to a profile, while you still have to remove the old entries. There is a lot of duplicate work, atleast for me, using this tool. I would maybe like a switch in the command to MOVE (or SET) the newly added entries (e.g entries in the 'default' profile) to a profile. Not to copy them. And the Anti-Beacon tool can be found here. |
Thanks @Fooughhy for your patience. I get it better now. Watching the Although, I think there is some changes that can be done to improve usage. We can add a cache of profiles for Maybe if we have a layout like this:
All this will simplify some parts, but sitll not sure how to handle content added from other tools (like Anti-Beacon). |
I think it's you who has the patience while I figure out what I mean 👍 What I want from the "added content from other tools" part is simply a parameter for the commands (such as ´hostctl add´) to MOVE content in a profile to another profile. Maybe this is the current functionality, but I did something wrong. There seems to be some special circumstances with the 'default' profile. I added the entries from this profile to another, then tried to remove the 'default' profile (this was my attempt at MOVING entries recently added to another profile). I do not recall if I tried to remove all entries in the 'default' profile or simply the profile itself, but this didn't work. |
Well, my view is that the Also, moving from one profile to another adds lots of complexity and I think it won't be a much used feature. I'm not discarding anything yet, but we need to come up with an elegant solution. |
I think you should use You've talked about a config file before. One thing that you could consider is an event-based config file where you can define commands to run on events (e.g. |
Yeah, that was my feeling regarding the 'default' profile and it makes perfect sense. Maybe my needs are simply out-of-scope for this tool. |
Is your feature request related to a problem? Please describe.
This is a great tool, as the hosts file can be a b**ch to organize! The issue I am having is that I use tools to add entries to the hosts file and (maybe I simply do not understand the tool) would like to somehow manage these entries easily. I use tools like Spybot Anti-Beacon which automatically add entries specifically to the default "hosts" file.
Describe the solution you'd like
Would like to somehow combine files into one hosts file. As stated, maybe I don't fully understand how it works. If I were to divide my hosts file into profiles, then use Anti-Beacon to update its entries, I would like to be able to add all of those new entries to the "Anti-Beacon" profile basically. If this is possible already, then disregard this.
Describe alternatives you've considered
What I've considered, as hostctl (to my knowledge) can target other hosts files easily, is to have several files for each tool and use hostctl to combine these into a "master" hosts file. This is cumbersome as it involves the swapping of hosts files (e.g if I have all Anti-Beacon entries in a 'hosts.beacon' file, when I want to update these entries I have to rename it to "hosts" and then use the tool to update the entries, rename it again to 'hosts.beacon' and use hostctl to import the new entries).
Additional context
The documentation for this tool seems (to me) inadequate as I am not entirely sure how to exactly import entries to the hosts file. I just now found how to add profiles, as the set command is not part of the "CLI Usage" documentation for some reason...
The text was updated successfully, but these errors were encountered: