adjust sdk examples to use backend instead of

This commit is contained in:
Curt Tudor 2024-03-25 12:24:10 -06:00
parent 240fadfa4b
commit c4842a5a81
No known key found for this signature in database
GPG Key ID: B3CD225AF4EC8E96
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ func main() {
}
shr, err := sdk.CreateShare(root, &sdk.ShareRequest{
BackendMode: sdk.TcpTunnelBackendMode,
BackendMode: sdk.ProxyBackendMode,
ShareMode: sdk.PublicShareMode,
Frontends: []string{"public"},
Target: "http-server",

View File

@ -21,7 +21,7 @@ program
// Create the zrok private share that will represent this web server
console.log("Now creating your private zrok share...")
let shr = await zrok.CreateShare(root, new zrok.ShareRequest(zrok.TCP_TUNNEL_BACKEND_MODE, zrok.PRIVATE_SHARE_MODE, "http-server", ["private"]));
let shr = await zrok.CreateShare(root, new zrok.ShareRequest(zrok.PROXY_BACKEND_MODE, zrok.PRIVATE_SHARE_MODE, "http-server", ["private"]));
console.log(`access your private HTTP Server on another machine using: 'zrok access private ${shr.Token}'`)
// Create a NodeJS Express web server that listens NOT on a TCP port, but for incoming Ziti connections to the private zrok share

View File

@ -27,7 +27,7 @@ if __name__ == '__main__':
root = zrok.environment.root.Load()
try:
shr = zrok.share.CreateShare(root=root, request=ShareRequest(
BackendMode=zrok.model.TCP_TUNNEL_BACKEND_MODE,
BackendMode=zrok.model.PROXY_BACKEND_MODE,
ShareMode=zrok.model.PUBLIC_SHARE_MODE,
Frontends=['public'],
Target="http-server"