summaryrefslogtreecommitdiff
path: root/internal/discovery/discovery.go
AgeCommit message (Collapse)Author
2026-04-22Rename Moduleherkulessi
2026-02-20Building: Remove release tagJeroen Wijenbergh
As we now have the discovery JSON files in the repo, it makes no sense to conditionally embed the files. Just always embed them
2026-02-20All: Log HTTP body when JSON unmarshal failsJeroen Wijenbergh
Fixes: #112
2026-02-12All: Rename packages that sound useless or clash with stdJeroen Wijenbergh
2025-08-29Discovery: Remove manager and DiscoveryStartupJeroen Wijenbergh
2025-08-29Discovery: Add cache argument and embed unmarshal on startupJeroen Wijenbergh
2025-05-06All: Move to log/slogJeroen Wijenbergh
2025-05-06All: Run modernize --test --fixJeroen Wijenbergh
2025-05-06All: Fix staticcheck errorsJeroen Wijenbergh
2024-11-21Replace all links from GitHub to Codebergjwijenbergh
2024-07-30Format: Run Gofumptjwijenbergh
2024-07-17Discovery: Remove organizations per 4 hour expiryjwijenbergh
As setting organizations expired is now done in register
2024-07-17Client + Discovery: Fetch dscovery at startup using DiscoveryStartupjwijenbergh
With a manager that locks and copies such that no race conditions happen
2024-07-17Discovery: Implement conditional requestsjwijenbergh
From docs.eduvpn.org (https://docs.eduvpn.org/server/v3/server-discovery.html): When fetching the new JSON files, the client SHOULD use conditional requests, so the file is only fetched in case there were changes. This, in order to reduce the amount of traffic required by VPN clients, especially relevant for metered, or slow connections. The If-Modified-Since request header SHOULD be used for this. If the response code is 304, the file hasn’t changed since. The value to use for the If-Modified-Since request header is the exact value of the Last-Modified response header for the last successful download, i.e. 200 response. You SHOULD store the value of Last-Modified and use it as-is for the If-Modified-Since header.
2024-07-17Client: Fetch disco fresh after startup calling GetConfigjwijenbergh
2024-06-27Discovery: Unmarshal to a new structure to fix #55jwijenbergh
2024-06-25Discovery: Return a fresh booleanjwijenbergh
2024-06-06Discovery: Organization list cache updatesjwijenbergh
2024-05-29Discovery: Improve search using levenshtein distance and sortingjwijenbergh
2024-05-29Discovery: return country_code to the clientjwijenbergh
2024-05-29Discovery: Convert the search query to lowerjwijenbergh
2024-05-29Discovery: Implement search and do not return keywordsjwijenbergh
This patch implements search by adding a second argument to DiscoOrganizations and DiscoServers. A search string of = "" returns everything. This also makes the subset that is returned to the client even fewer, no keywords.
2024-05-29Discovery: Return a subset to the clientJeroen Wijenbergh
2024-03-07Discovery: Resolve logging TODOsjwijenbergh
2024-02-19All: Document everything to pass revive lintjwijenbergh
2024-02-19Discovery: Mark orgs expired on org by id errorjwijenbergh
2024-02-19Discovery: Use new HTTP Clientjwijenbergh
2024-02-19All: Prepare to get rid of go-errors/errors libjwijenbergh
2023-09-25Discovery: Pass a context aroundjwijenbergh
2023-09-25Types: Split discovery into its own packagejwijenbergh
2023-02-28Discovery: Cache within JSON as welljwijenbergh
2023-02-27Discovery: Conditionally embed latest discovery files for local cachejwijenbergh
Conditionally embedding based on https://github.com/golang/go/issues/44484#issuecomment-948137497 To use it, wget the discovery files into the internal/discovery folder (same JSON name) after verifying the signature. Then build with -tags=release
2023-02-16Test: Implement util package for starting a TLS serverjwijenbergh
2023-01-10Client + Discovery: Implement further organizations expiryjwijenbergh
2023-01-06Refactor: Re-use a HTTP clientjwijenbergh
2023-01-03Discovery: Remove server type from getting by country codejwijenbergh
It's always secure internet, no need to pass it as an argument
2023-01-02Discovery: Omit type info for global disco URLjwijenbergh
2023-01-02Discovery: Allow overriding Disco URLjwijenbergh
2022-12-12Discovery: Minor style changes with variable namesjwijenbergh
2022-12-12simplify error handlingAleksandar Pesic
fixes #6 Signed-off-by: Aleksandar Pesic <peske.nis@gmail.com>
2022-11-28Formatting: Run gofumpt -wjwijenbergh
2022-11-28Refactor: Fix revive linter errors by deleting redundant prefixesjwijenbergh
2022-11-28Lint: Run godot fixjwijenbergh
Full command: golangci-lint run --disable-all -E godot --fix
2022-11-28Refactor: Remove most get prefixes for receiver functionsjwijenbergh
2022-11-28Document: Add comments for most functions and packagesjwijenbergh
Errors and test files still need to be done. Also some getters are changed by removing the 'get' prefix
2022-11-25Discovery + Exports: Rename variable to not clash with server pkgjwijenbergh
2022-11-24Style: Use stylecheck and fix errorsjwijenbergh
2022-11-24Discovery + Server: Get rid of unused importsjwijenbergh
2022-11-24Util: Get rid of current time helperjwijenbergh
Fixes #5
2022-10-19Refactor: Make errors use the parent's error leveljwijenbergh
- All wrapped errors have to be created with types.NewWrappedError to inherit the error level from the parent - Or types.NewWrappedErrorLevel can be used which means a custom error level is given. For example this is done with cancelling OAuth - Client public errors are forwarded with handleError that also logs it with the error's level