mirror of
https://github.com/openziti/zrok.git
synced 2025-08-10 00:17:46 +02:00
Merge branch 'main' of github.com:openziti/zrok into python-sdk
This commit is contained in:
@ -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 {
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user