summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-25Docs: Small typosjwijenbergh
2023-09-25Docs: API fix link and spelling in adding a serverjwijenbergh
2023-09-25Docs: Set mermaid theme to neutraljwijenbergh
Much better for dark theme too
2023-09-25Docs: Only increase the width for the state machinejwijenbergh
2023-09-25Docs: Move state machine to APIjwijenbergh
2023-09-25Docs: Increase the content widthjwijenbergh
2023-09-25Docs: Update API section for V2jwijenbergh
2023-09-25Workflows: Add mermaid support for mdbookjwijenbergh
2023-09-25Client: Do not defer NoServer transition when noninteractivejwijenbergh
2023-09-25Exports: Document AddServer ni flagjwijenbergh
2023-09-25Exports: Fix function name for DiscoOrganizations in commentsjwijenbergh
2023-09-25Exports: Small fixes in cookie commentsjwijenbergh
2023-09-25Exports: Document getconfig prefer TCP and return typejwijenbergh
2023-09-25Exports: Initial comments documenting the APIjwijenbergh
2023-09-25Exports: Lowercase statecallbackjwijenbergh
2023-09-25Exports: Remove unused error.hjwijenbergh
2023-09-25Version: Update to 2.0.0jwijenbergh
2023-09-25Secure: Do not set current location as it is already donejwijenbergh
2023-09-25Verify Test: Use callStr on errorjwijenbergh
2023-09-25OAuth Token: Set previous refresh token if new refresh token is emptyjwijenbergh
This is for 2.x servers that return an empty refresh token after refreshing
2023-09-25Custom: Use the hostname for custom servers display namejwijenbergh
2023-09-25Client: Relax state requirements for No Server on addjwijenbergh
2023-09-25Client: Fix institute servers map typojwijenbergh
2023-09-25Client: Return on refresh endpoints context errorjwijenbergh
2023-09-25Server: Support unmarshalling server as a stringjwijenbergh
This is for V1 configs
2023-09-25Wrappers Python: Get rid of optional as returnjwijenbergh
If an error is non-nil, the data is guaranteed to contain a value For discovery we do not explicitly forward errors (TODO, log in the wrapper?). However, when building in release mode, we have embedded disco so even if we get an error we should have guaranteed that it contains a value
2023-09-25Client: Re-create failover object on new calljwijenbergh
This additional bookkeeping is not needed now because we have contexts
2023-09-25Exports: Fix void signature for TokenGetterjwijenbergh
2023-09-25All: Implement a token handlerjwijenbergh
This implements a token handler for OAuth tokens. Clients can use the SetTokenHandler function in exports to set a token handler. It needs two arguments, a getter and a setter. The getter is a callback with three arguments: - The server to get the tokens for, in types.server.current as JSON - The output buffer - The output buffer maximum length The tokens should be written to the output buffer with maximum length. The type should be types.server.Tokens and be marshalled as JSON. If no tokens are available, leave the output buffer intact The token setter is a callback with two arguments: - The server for which to set the tokens for, in types.server.Current as JSON - The tokens, defined in types.server.Tokens as JSON Breaking changes: - No more tokens as arguments, was already deprecated in previous commits - Tokens are no longer returned in types.server.Configuration
2023-09-25Python: Get rid of token callbackjwijenbergh
2023-09-25Exports: Remove token updaterjwijenbergh
2023-09-25CLI: Implement newest API using cookiesjwijenbergh
2023-09-25Exports: Implement newest API using cookie handlersjwijenbergh
BREAKING CHANGES: - The following functions need a special "cookie" as the first argument - Add server (also now has an extra int as last argument, if non 0 run no callbacks, useful for preprovisioned servers) - Get config - Set secure location - Disco servers - Disco organizations - Cleanup - Renew session - Start failover Removed functions: - "CancelOAuth", "CancelFailover" replaced by "CookieCancel" - SecureLocationList, removed because the secure internet server from ServerList() now has the locations embedded in the JSON A cookie is a specialized context that can be used for cancellation and sending values across a channel. Cancel OAuth and Cancel failover functions have thus been removed. Instead, create a cookie with "CookieNew", pass it to the function as the first argument and when you want to cancel, run "CookieCancel". The functions mentioned above use network requests, or some other long running procedure. Even though we have a timeout set to 10 seconds for failover and network requests, it might make sense to make this longer and just have clients cancel the request. Cookies that have been created with "CookieNew" must be freed with CookieDelete, which cancels the cookie and then deletes the underlying handle. Because cookies have a channel associated with them, they are used for replying to state callbacks. When you receive an ASK_PROFILE or ASK_LOCATION request, you get the same cookie back that you have created when passed to the function (key "cookie" in the state data). Reply with your answer (the profile or location) with "CookieReply" passing in the cookie as first argument and the data as second. This means that SetProfileID and SetSecureLocation should now only be used when not in a state callback. E.g. just changing the profile or location when triggered by the user. Finally, when a cookie is canceled, the error that is returned by the function inherits from the Go context cancellation error: https://pkg.go.dev/context#pkg-variables ("context canceled")
2023-09-25Wrappers Python: Update to newest API by implementing cookiesjwijenbergh
2023-09-25Refactor: Move client implementation to one filejwijenbergh
Much easier to oversee and it forces me to keep the client type as small as possible. This also uses the cookie for cancellation We also no longer require tokens inside arguments. We will later implement them with callbacks
2023-09-25Types Server: Implement required ask transition needed for clientjwijenbergh
2023-09-25Types: Add a new cookie typejwijenbergh
Used as a specialized context in state callbacks and for cancellation
2023-09-25OAuth: Implement the Public() method for tokensjwijenbergh
2023-09-25Refactor: Split internal server into multiple packagesjwijenbergh
- Pass contexts - Have separate packages for e.g. custom, institute and secure - internet servers, profiles.... - Return types from the public ./types package with a Public() method
2023-09-25HTTP: Pass context around and optionally trail path in urljwijenbergh
2023-09-25OAuth: Pass a context aroundjwijenbergh
2023-09-25Failover: Pass a context aroundjwijenbergh
2023-09-25Types Server: Pass locations to secure internetjwijenbergh
2023-09-25Format: Run gofumpt (Go) + black (py)jwijenbergh
2023-09-25Discovery: Pass a context aroundjwijenbergh
2023-09-25Client: Improve Let's Connect! not supported errorsjwijenbergh
2023-09-25Client: failover cancel error should be lowercasejwijenbergh
2023-09-25Client: Remove OpenVPN check for failover and check if in progressjwijenbergh
2023-09-25Wrappers Python: Separate BoolError data type to get rid of decode_funcjwijenbergh
2023-09-25Fix connection monitoring on WindowsSimon Rozman
Linux requires su for `ip4:icmp` pings. Windows does not support `udp4` pings. Signed-off-by: Simon Rozman <simon@rozman.si>