Compare commits
6
Commits
v2.1.0
...
c341d70f73
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c341d70f73 | ||
|
|
cb29c8e392 | ||
|
|
ce7a250309 | ||
|
|
c0bf77b88c | ||
|
|
306e2e52d2 | ||
|
|
80bb7d45f8 |
@@ -1,4 +1,4 @@
|
|||||||
# ekekDNSHelper
|
# ekDNSHelper
|
||||||
|
|
||||||
A cross-platform CLI tool that resolves hostnames against DNS servers and writes the resulting IP-to-hostname mappings into the local hosts file. It manages a clearly delimited block within the hosts file so it can cleanly add and remove only its own entries.
|
A cross-platform CLI tool that resolves hostnames against DNS servers and writes the resulting IP-to-hostname mappings into the local hosts file. It manages a clearly delimited block within the hosts file so it can cleanly add and remove only its own entries.
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ By default, ekdns performs **smart resolution**: it discovers the authoritative
|
|||||||
|
|
||||||
Built as a single static binary with no runtime dependencies.
|
Built as a single static binary with no runtime dependencies.
|
||||||
|
|
||||||
**Copyright (c) 2024 Emberkom LLC**
|
**Copyright (c) 2026 Emberkom LLC**
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|||||||
@@ -78,12 +78,14 @@ if (-not (Test-Path $OutputDir)) {
|
|||||||
Write-Host "Created output directory: $OutputDir" -ForegroundColor Green
|
Write-Host "Created output directory: $OutputDir" -ForegroundColor Green
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build flags
|
# Build flags — always inject version and copyright year; release builds also strip debug symbols.
|
||||||
$ldflags = ""
|
$buildYear = (Get-Date).Year
|
||||||
|
$injectedFlags = "-X main.version=$gitTag -X main.copyrightYear=$buildYear"
|
||||||
if ($Release) {
|
if ($Release) {
|
||||||
$ldflags = "-s -w"
|
$ldflags = "-s -w $injectedFlags"
|
||||||
Write-Host "Building RELEASE version (optimized, no debug symbols)..." -ForegroundColor Green
|
Write-Host "Building RELEASE version (optimized, no debug symbols)..." -ForegroundColor Green
|
||||||
} else {
|
} else {
|
||||||
|
$ldflags = $injectedFlags
|
||||||
Write-Host "Building DEBUG version (with debug symbols)..." -ForegroundColor Yellow
|
Write-Host "Building DEBUG version (with debug symbols)..." -ForegroundColor Yellow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,10 +14,14 @@ import (
|
|||||||
"ekdns/resolver"
|
"ekdns/resolver"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// version and copyrightYear are set at build time via -ldflags.
|
||||||
|
var version = "dev"
|
||||||
|
var copyrightYear = "2024"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Banner (always printed to stdout).
|
// Banner (always printed to stdout).
|
||||||
fmt.Println("ekDNSHelper v1.0")
|
fmt.Printf("ekDNSHelper %s\n", version)
|
||||||
fmt.Println("Copyright (c) 2024 Emberkom LLC")
|
fmt.Printf("Copyright (c) %s Emberkom LLC\n", copyrightYear)
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
|
|
||||||
if len(os.Args) < 2 {
|
if len(os.Args) < 2 {
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user