Skip to content

Commit 9195ba5

Browse files
committed
Add request timeout to tunnel options
1 parent f51d0ce commit 9195ba5

8 files changed

Lines changed: 42 additions & 4 deletions

File tree

cs/src/Contracts/TunnelOptions.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,14 @@ public class TunnelOptions
9494
/// </remarks>
9595
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
9696
public bool? IsPartitionedSiteAuthenticationEnabled { get; set; }
97+
98+
/// <summary>
99+
/// Gets or sets the timeout for HTTP requests to the tunnel or port.
100+
/// </summary>
101+
/// <remarks>
102+
/// The default timeout is 100 seconds. If the host does not return a response before the timeout,
103+
/// the tunnel relay aborts the request and returns 504 Gateway Timeout.
104+
/// </remarks>
105+
public int? RequestTimeoutSeconds { get; set; }
97106
}
98107
}

go/tunnels/tunnel_options.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,10 @@ type TunnelOptions struct {
5858
// A partitioned cookie always also has SameSite=None for compatbility with browsers that
5959
// do not support partitioning.
6060
IsPartitionedSiteAuthenticationEnabled bool `json:"isPartitionedSiteAuthenticationEnabled,omitempty"`
61+
62+
// Gets or sets the timeout for HTTP requests to the tunnel or port.
63+
//
64+
// The default timeout is 100 seconds. If the host does not return a response before the
65+
// timeout, the tunnel relay aborts the request and returns 504 Gateway Timeout.
66+
RequestTimeoutSeconds int32 `json:"requestTimeoutSeconds"`
6167
}

go/tunnels/tunnels.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/rodaine/table"
1111
)
1212

13-
const PackageVersion = "0.1.17"
13+
const PackageVersion = "0.1.18"
1414

1515
func (tunnel *Tunnel) requestObject() (*Tunnel, error) {
1616
convertedTunnel := &Tunnel{

java/src/main/java/com/microsoft/tunnels/contracts/TunnelOptions.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,13 @@ public class TunnelOptions {
8787
*/
8888
@Expose
8989
public boolean isPartitionedSiteAuthenticationEnabled;
90+
91+
/**
92+
* Gets or sets the timeout for HTTP requests to the tunnel or port.
93+
*
94+
* The default timeout is 100 seconds. If the host does not return a response before
95+
* the timeout, the tunnel relay aborts the request and returns 504 Gateway Timeout.
96+
*/
97+
@Expose
98+
public int requestTimeoutSeconds;
9099
}

rs/src/contracts/tunnel_options.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,10 @@ pub struct TunnelOptions {
6969
// that do not support partitioning.
7070
#[serde(default)]
7171
pub is_partitioned_site_authentication_enabled: Option<bool>,
72+
73+
// Gets or sets the timeout for HTTP requests to the tunnel or port.
74+
//
75+
// The default timeout is 100 seconds. If the host does not return a response before
76+
// the timeout, the tunnel relay aborts the request and returns 504 Gateway Timeout.
77+
pub request_timeout_seconds: Option<i32>,
7278
}

ts/src/connections/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"buffer": "^5.2.1",
1919
"debug": "^4.1.1",
2020
"vscode-jsonrpc": "^4.0.0",
21-
"@microsoft/dev-tunnels-contracts": "^1.3.0",
22-
"@microsoft/dev-tunnels-management": "^1.3.0",
21+
"@microsoft/dev-tunnels-contracts": "^1.3.6",
22+
"@microsoft/dev-tunnels-management": "^1.3.6",
2323
"@microsoft/dev-tunnels-ssh": "^3.12.12",
2424
"@microsoft/dev-tunnels-ssh-tcp": "^3.12.12",
2525
"uuid": "^3.3.3",

ts/src/contracts/tunnelOptions.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,12 @@ export interface TunnelOptions {
7676
* that do not support partitioning.
7777
*/
7878
isPartitionedSiteAuthenticationEnabled?: boolean;
79+
80+
/**
81+
* Gets or sets the timeout for HTTP requests to the tunnel or port.
82+
*
83+
* The default timeout is 100 seconds. If the host does not return a response before
84+
* the timeout, the tunnel relay aborts the request and returns 504 Gateway Timeout.
85+
*/
86+
requestTimeoutSeconds?: number;
7987
}

ts/src/management/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"buffer": "^5.2.1",
1919
"debug": "^4.1.1",
2020
"vscode-jsonrpc": "^4.0.0",
21-
"@microsoft/dev-tunnels-contracts": "^1.3.0",
21+
"@microsoft/dev-tunnels-contracts": "^1.3.6",
2222
"axios": "^1.8.4"
2323
}
2424
}

0 commit comments

Comments
 (0)