Skip to content

Commit 5930c74

Browse files
feat: Add proxy hostname bypass hosts
1 parent da97422 commit 5930c74

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 101
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-9462b3d8f055f8bda06da65583f5aa09a17d35254c5983796d8e84ebb3c62c47.yml
3-
openapi_spec_hash: 1914dd35b8e0e5a21ccec91eac2a616d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-d53de581fcac5c3b06940fc93667b9cd2a6a60dd3674da7c1f47484b0f442bf8.yml
3+
openapi_spec_hash: 177d0c537b7e5357c815bb64175e6484
44
config_hash: c6b88eea9a15840f26130eb8ed3b42a0

proxy.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ type ProxyNewResponse struct {
9898
// Any of "datacenter", "isp", "residential", "mobile", "custom".
9999
Type ProxyNewResponseType `json:"type" api:"required"`
100100
ID string `json:"id"`
101+
// Hostnames that should bypass the parent proxy and connect directly.
102+
BypassHosts []string `json:"bypass_hosts"`
101103
// Configuration specific to the selected proxy `type`.
102104
Config ProxyNewResponseConfigUnion `json:"config"`
103105
// IP address that the proxy uses when making requests.
@@ -118,6 +120,7 @@ type ProxyNewResponse struct {
118120
JSON struct {
119121
Type respjson.Field
120122
ID respjson.Field
123+
BypassHosts respjson.Field
121124
Config respjson.Field
122125
IPAddress respjson.Field
123126
LastChecked respjson.Field
@@ -389,6 +392,8 @@ type ProxyGetResponse struct {
389392
// Any of "datacenter", "isp", "residential", "mobile", "custom".
390393
Type ProxyGetResponseType `json:"type" api:"required"`
391394
ID string `json:"id"`
395+
// Hostnames that should bypass the parent proxy and connect directly.
396+
BypassHosts []string `json:"bypass_hosts"`
392397
// Configuration specific to the selected proxy `type`.
393398
Config ProxyGetResponseConfigUnion `json:"config"`
394399
// IP address that the proxy uses when making requests.
@@ -409,6 +414,7 @@ type ProxyGetResponse struct {
409414
JSON struct {
410415
Type respjson.Field
411416
ID respjson.Field
417+
BypassHosts respjson.Field
412418
Config respjson.Field
413419
IPAddress respjson.Field
414420
LastChecked respjson.Field
@@ -680,6 +686,8 @@ type ProxyListResponse struct {
680686
// Any of "datacenter", "isp", "residential", "mobile", "custom".
681687
Type ProxyListResponseType `json:"type" api:"required"`
682688
ID string `json:"id"`
689+
// Hostnames that should bypass the parent proxy and connect directly.
690+
BypassHosts []string `json:"bypass_hosts"`
683691
// Configuration specific to the selected proxy `type`.
684692
Config ProxyListResponseConfigUnion `json:"config"`
685693
// IP address that the proxy uses when making requests.
@@ -700,6 +708,7 @@ type ProxyListResponse struct {
700708
JSON struct {
701709
Type respjson.Field
702710
ID respjson.Field
711+
BypassHosts respjson.Field
703712
Config respjson.Field
704713
IPAddress respjson.Field
705714
LastChecked respjson.Field
@@ -971,6 +980,8 @@ type ProxyCheckResponse struct {
971980
// Any of "datacenter", "isp", "residential", "mobile", "custom".
972981
Type ProxyCheckResponseType `json:"type" api:"required"`
973982
ID string `json:"id"`
983+
// Hostnames that should bypass the parent proxy and connect directly.
984+
BypassHosts []string `json:"bypass_hosts"`
974985
// Configuration specific to the selected proxy `type`.
975986
Config ProxyCheckResponseConfigUnion `json:"config"`
976987
// IP address that the proxy uses when making requests.
@@ -991,6 +1002,7 @@ type ProxyCheckResponse struct {
9911002
JSON struct {
9921003
Type respjson.Field
9931004
ID respjson.Field
1005+
BypassHosts respjson.Field
9941006
Config respjson.Field
9951007
IPAddress respjson.Field
9961008
LastChecked respjson.Field
@@ -1262,6 +1274,8 @@ type ProxyNewParams struct {
12621274
Type ProxyNewParamsType `json:"type,omitzero" api:"required"`
12631275
// Readable name of the proxy.
12641276
Name param.Opt[string] `json:"name,omitzero"`
1277+
// Hostnames that should bypass the parent proxy and connect directly.
1278+
BypassHosts []string `json:"bypass_hosts,omitzero"`
12651279
// Configuration specific to the selected proxy `type`.
12661280
Config ProxyNewParamsConfigUnion `json:"config,omitzero"`
12671281
// Protocol to use for the proxy connection.

proxy_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ func TestProxyNewWithOptionalParams(t *testing.T) {
2727
option.WithAPIKey("My API Key"),
2828
)
2929
_, err := client.Proxies.New(context.TODO(), kernel.ProxyNewParams{
30-
Type: kernel.ProxyNewParamsTypeDatacenter,
30+
Type: kernel.ProxyNewParamsTypeDatacenter,
31+
BypassHosts: []string{"string"},
3132
Config: kernel.ProxyNewParamsConfigUnion{
3233
OfProxyNewsConfigDatacenterProxyConfig: &kernel.ProxyNewParamsConfigDatacenterProxyConfig{
3334
Country: kernel.String("US"),

0 commit comments

Comments
 (0)