Merge branch 'main' of github.com:openziti/zrok into python-sdk

This commit is contained in:
Cam
2023-11-16 10:56:38 -06:00
90 changed files with 1903 additions and 645 deletions

View File

@ -10,6 +10,7 @@ const (
TcpTunnelBackendMode BackendMode = "tcpTunnel"
UdpTunnelBackendMode BackendMode = "udpTunnel"
CaddyBackendMode BackendMode = "caddy"
DriveBackendMode BackendMode = "drive"
)
type ShareMode string
@ -20,6 +21,7 @@ const (
)
type ShareRequest struct {
Reserved bool
BackendMode BackendMode
ShareMode ShareMode
Target string
@ -31,8 +33,8 @@ type ShareRequest struct {
}
type Share struct {
Token string
FrontendEndpoints []string
Token string `json:"token"`
FrontendEndpoints []string `json:"frontend_endpoints"`
}
type AccessRequest struct {

View File

@ -25,6 +25,7 @@ func CreateShare(root env_core.Root, request *ShareRequest) (*Share, error) {
default:
return nil, errors.Errorf("unknown share mode '%v'", request.ShareMode)
}
out.Body.Reserved = request.Reserved
if len(request.BasicAuth) > 0 {
out.Body.AuthScheme = string(Basic)