@@ -19,6 +19,45 @@ import * as _m0 from 'protobufjs/minimal';
19
19
20
20
export const protobufPackage = 'pomerium.cli' ;
21
21
22
+ export enum Protocol {
23
+ UNKNOWN = 0 ,
24
+ TCP = 1 ,
25
+ UDP = 2 ,
26
+ UNRECOGNIZED = - 1 ,
27
+ }
28
+
29
+ export function protocolFromJSON ( object : any ) : Protocol {
30
+ switch ( object ) {
31
+ case 0 :
32
+ case 'UNKNOWN' :
33
+ return Protocol . UNKNOWN ;
34
+ case 1 :
35
+ case 'TCP' :
36
+ return Protocol . TCP ;
37
+ case 2 :
38
+ case 'UDP' :
39
+ return Protocol . UDP ;
40
+ case - 1 :
41
+ case 'UNRECOGNIZED' :
42
+ default :
43
+ return Protocol . UNRECOGNIZED ;
44
+ }
45
+ }
46
+
47
+ export function protocolToJSON ( object : Protocol ) : string {
48
+ switch ( object ) {
49
+ case Protocol . UNKNOWN :
50
+ return 'UNKNOWN' ;
51
+ case Protocol . TCP :
52
+ return 'TCP' ;
53
+ case Protocol . UDP :
54
+ return 'UDP' ;
55
+ case Protocol . UNRECOGNIZED :
56
+ default :
57
+ return 'UNRECOGNIZED' ;
58
+ }
59
+ }
60
+
22
61
/** Record represents a single tunnel record in the configuration */
23
62
export interface Record {
24
63
/** if omitted, a new record would be created */
@@ -322,6 +361,8 @@ export interface ClientCertFromStore {
322
361
export interface Connection {
323
362
/** name is a user friendly connection name that a user may define */
324
363
name ?: string | undefined ;
364
+ /** the protocol to use for the connection */
365
+ protocol ?: Protocol | undefined ;
325
366
/** remote_addr is a remote pomerium host:port */
326
367
remoteAddr : string ;
327
368
/** listen_address, if not provided, will assign a random port each time */
@@ -2332,6 +2373,7 @@ export const ClientCertFromStore = {
2332
2373
function createBaseConnection ( ) : Connection {
2333
2374
return {
2334
2375
name : undefined ,
2376
+ protocol : undefined ,
2335
2377
remoteAddr : '' ,
2336
2378
listenAddr : undefined ,
2337
2379
pomeriumUrl : undefined ,
@@ -2350,6 +2392,9 @@ export const Connection = {
2350
2392
if ( message . name !== undefined ) {
2351
2393
writer . uint32 ( 10 ) . string ( message . name ) ;
2352
2394
}
2395
+ if ( message . protocol !== undefined ) {
2396
+ writer . uint32 ( 80 ) . int32 ( message . protocol ) ;
2397
+ }
2353
2398
if ( message . remoteAddr !== '' ) {
2354
2399
writer . uint32 ( 18 ) . string ( message . remoteAddr ) ;
2355
2400
}
@@ -2387,6 +2432,9 @@ export const Connection = {
2387
2432
case 1 :
2388
2433
message . name = reader . string ( ) ;
2389
2434
break ;
2435
+ case 10 :
2436
+ message . protocol = reader . int32 ( ) as any ;
2437
+ break ;
2390
2438
case 2 :
2391
2439
message . remoteAddr = reader . string ( ) ;
2392
2440
break ;
@@ -2422,6 +2470,9 @@ export const Connection = {
2422
2470
fromJSON ( object : any ) : Connection {
2423
2471
return {
2424
2472
name : isSet ( object . name ) ? String ( object . name ) : undefined ,
2473
+ protocol : isSet ( object . protocol )
2474
+ ? protocolFromJSON ( object . protocol )
2475
+ : undefined ,
2425
2476
remoteAddr : isSet ( object . remoteAddr ) ? String ( object . remoteAddr ) : '' ,
2426
2477
listenAddr : isSet ( object . listenAddr )
2427
2478
? String ( object . listenAddr )
@@ -2445,6 +2496,11 @@ export const Connection = {
2445
2496
toJSON ( message : Connection ) : unknown {
2446
2497
const obj : any = { } ;
2447
2498
message . name !== undefined && ( obj . name = message . name ) ;
2499
+ message . protocol !== undefined &&
2500
+ ( obj . protocol =
2501
+ message . protocol !== undefined
2502
+ ? protocolToJSON ( message . protocol )
2503
+ : undefined ) ;
2448
2504
message . remoteAddr !== undefined && ( obj . remoteAddr = message . remoteAddr ) ;
2449
2505
message . listenAddr !== undefined && ( obj . listenAddr = message . listenAddr ) ;
2450
2506
message . pomeriumUrl !== undefined &&
@@ -2472,6 +2528,7 @@ export const Connection = {
2472
2528
) : Connection {
2473
2529
const message = createBaseConnection ( ) ;
2474
2530
message . name = object . name ?? undefined ;
2531
+ message . protocol = object . protocol ?? undefined ;
2475
2532
message . remoteAddr = object . remoteAddr ?? '' ;
2476
2533
message . listenAddr = object . listenAddr ?? undefined ;
2477
2534
message . pomeriumUrl = object . pomeriumUrl ?? undefined ;
0 commit comments