{"id":19901333,"url":"https://github.com/lissy93/old_adguardian-term","last_synced_at":"2025-05-02T23:31:38.593Z","repository":{"id":172405967,"uuid":"649129086","full_name":"Lissy93/OLD_AdGuardian-Term","owner":"Lissy93","description":"Go Lang CLI app for monitoring AdGuard traffic | See Rust version at: https://github.com/Lissy93/AdGuardian-Term","archived":false,"fork":false,"pushed_at":"2024-08-12T14:39:32.000Z","size":40,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T08:32:13.715Z","etag":null,"topics":["adguard","fail","golang","terminal","tui"],"latest_commit_sha":null,"homepage":"https://adguardian.as93.net","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lissy93.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-03T21:50:28.000Z","updated_at":"2025-02-01T19:00:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"c25c1e1a-caab-40cc-90c6-037c7bc98a04","html_url":"https://github.com/Lissy93/OLD_AdGuardian-Term","commit_stats":null,"previous_names":["lissy93/old_adguardian-term"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissy93%2FOLD_AdGuardian-Term","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissy93%2FOLD_AdGuardian-Term/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissy93%2FOLD_AdGuardian-Term/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lissy93%2FOLD_AdGuardian-Term/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lissy93","download_url":"https://codeload.github.com/Lissy93/OLD_AdGuardian-Term/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252122273,"owners_count":21698305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adguard","fail","golang","terminal","tui"],"created_at":"2024-11-12T20:14:40.143Z","updated_at":"2025-05-02T23:31:38.283Z","avatar_url":"https://github.com/Lissy93.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eAdGuardian-Term (Go Version)\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ci\u003eReal-time terminal monitoring \u0026 stats for AdGuard Home\u003c/i\u003e\u003cbr\u003e\n\t\u003cb\u003e🌐 \u003ca href=\"https://adguardian.as93.net/\"\u003eadguardian.as93.net\u003c/a\u003e\u003c/b\u003e\u003cbr\u003e\n\t\u003cimg width=\"128\" src=\"https://i.ibb.co/9phhMWP/adguardian-go.png\" /\u003e\u003cbr\u003e\n\u003c/p\u003e\n\n## About\n\n\u003cimg align=\"right\" width=\"460\" src=\"https://i.ibb.co/BykbdjF/Screenshot-from-2023-06-03-22-57-07.png\" \u003e\n\n\u003e [!NOTE]\n\u003e This app has now been re-written in Rust \u003ca href=\"https://github.com/Lissy93/AdGuardian-Term\"\u003e\u003cimg align=\"right\" width=\"110\" src=\"https://adguardian.as93.net/images/ferris.png\" /\u003e\u003c/a\u003e\u003cbr\u003e\n\u003e See **[Lissy93/AdGuardian-Term](https://github.com/Lissy93/AdGuardian-Term)** instead!\n\nMy purpose for uploading this (failed) project is to show that not everything goes according to plan, and that's okay - it's just part of the learning process!\nI've written more about my learnings in the [Background \u0026 Lessons Learned](#background--lessons-learned) section below.\n\nAlthough now re-written, this app is still fully functional, and pretty much feature complete.\nIf you wish to continue, see the [usage](#usage) instructions for development and deployment docs.\n\n\u003cbr\u003e\n\n---\n\n## Background \u0026 Lessons Learned\n\nInitially, I chose Go, because it's quite performant, has a neat concurrency model, is reasonably quick to write, and (most importantly) compiles into a tidy single binary. I'd also come across the gizak/termui package, which seemed to be the perfect choice for plotting the charts.\n\nHowever, I found Go's memory safety to be less than ideal. The compiler was irritating and managing threads manually was difficult. I also came across an issue which, for the life of me, I could not resolve - when termui updated the screen, random characters from the previous view would remain, making the charts hard for the user to read.\n\nAfter spending nearly an entire weekend building out this project, I arrived at the tough realization that I had probably chosen the wrong tech stack. I was initially reluctant to scrap everything I had written so far, but it was the best way forward.\n\nInstead, I picked up Rust - a language I'd been curious about but hadn't found the right opportunity to dive into. Rust, much like Go, is fast and efficient, but with one key difference - it emphasizes safety and manages memory exceptionally well. Rust also compiles into a single binary and has a robust concurrency model. In short, it seemed to address many of the issues I had encountered with Go.\n\nRebuilding my app in Rust wasn't a walk in the park, though. It has a steep learning curve and some unique concepts, like ownership and borrowing, which took a while to wrap my head around. Nevertheless, the more I delved into it, the more I found myself appreciating its design. In particular, its ability to prevent common programming errors, like null pointer dereferencing and data races, was a huge win for me.\n\n**As developers, we need to remind ourselves that it's okay to take a step back, reassess our decisions, and change our course if necessary. After all, in the long run, it's not about how quickly we can finish a project but about how well we can adapt, learn, and grow along the way. That's how we build not just better software, but also become better developers.**\n\nThe new project is uploaded here:\n\n[![Lissy93/AdGuardian-Term - GitHub](https://gh-card.dev/repos/Lissy93/AdGuardian-Term.svg?fullname=)](https://github.com/Lissy93/AdGuardian-Term)\n\n\n---\n\n## Usage\n\n### Prerequisites\nIf you haven't already done so, you'll need to [install Go Lang](https://go.dev/doc/install).\u003cbr\u003e\nThen clone the repo `git clone https://github.com/Lissy93/OLD_AdGuardian-Term.git \u0026\u0026 cd OLD_AdGuardian-Term`\n\n### Developing\nRun `go run .` to start the app\n\n### Deploying\nRun `go build` to generate the executable for your system.\u003cbr\u003e\nYou can then launch that with `./adguardian-term`\n\n### Docker\nThere's also a Dockerfile, although the image is not published to any registry.\u003cbr\u003e\nThis can be built with: `docker build -t adguardian .`\u003cbr\u003e\nAnd then run, with: `docker run adguardian`\n\n### Configuring\nThe app requires details of your AdGuard Home instance (endpoint and credentials).\nI didn't get round to making these parameters into environmental variables.\nSo currently you'll need to set them in [`values.go`](https://github.com/Lissy93/OLD_AdGuardian-Term/blob/main/values/values.go)\n\n---\n\n## License\n\n\u003e _**[Lissy93/OLD_AdGuardian](https://github.com/Lissy93/OLD_AdGuardian)** is licensed under [MIT](https://github.com/Lissy93/OLD_AdGuardian/blob/master/LICENSE) © [Alicia Sykes](https://aliciasykes.com) 2022._\u003cbr\u003e\n\u003e \u003csup align=\"right\"\u003eFor information, see \u003ca href=\"https://tldrlegal.com/license/mit-license\"\u003eTLDR Legal \u003e MIT\u003c/a\u003e\u003c/sup\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eExpand License\u003c/summary\u003e\n\n```\nThe MIT License (MIT)\nCopyright (c) Alicia Sykes \u003calicia@omg.com\u003e \n\nPermission is hereby granted, free of charge, to any person obtaining a copy \nof this software and associated documentation files (the \"Software\"), to deal \nin the Software without restriction, including without limitation the rights \nto use, copy, modify, merge, publish, distribute, sub-license, and/or sell \ncopies of the Software, and to permit persons to whom the Software is furnished \nto do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included install \ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANT ABILITY, FITNESS FOR A\nPARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n\n\u003c/details\u003e\n\n---\n\n\u003c!-- License + Copyright --\u003e\n\u003cp  align=\"center\"\u003e\n  \u003ci\u003e© \u003ca href=\"https://aliciasykes.com\"\u003eAlicia Sykes\u003c/a\u003e 2022\u003c/i\u003e\u003cbr\u003e\n  \u003ci\u003eLicensed under \u003ca href=\"https://gist.github.com/Lissy93/143d2ee01ccc5c052a17\"\u003eMIT\u003c/a\u003e\u003c/i\u003e\u003cbr\u003e\n  \u003ca href=\"https://github.com/lissy93\"\u003e\u003cimg src=\"https://i.ibb.co/4KtpYxb/octocat-clean-mini.png\" /\u003e\u003c/a\u003e\u003cbr\u003e\n  \u003csup\u003eThanks for visiting :)\u003c/sup\u003e\n\u003c/p\u003e\n\n\u003c!-- Dinosaur --\u003e\n\u003c!-- \n                        . - ~ ~ ~ - .\n      ..     _      .-~               ~-.\n     //|     \\ `..~                      `.\n    || |      }  }              /       \\  \\\n(\\   \\\\ \\~^..'                 |         }  \\\n \\`.-~  o      /       }       |        /    \\\n (__          |       /        |       /      `.\n  `- - ~ ~ -._|      /_ - ~ ~ ^|      /- _      `.\n              |     /          |     /     ~-.     ~- _\n              |_____|          |_____|         ~ - . _ _~_-_\n--\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flissy93%2Fold_adguardian-term","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flissy93%2Fold_adguardian-term","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flissy93%2Fold_adguardian-term/lists"}