gax-nodejs icon indicating copy to clipboard operation
gax-nodejs copied to clipboard

This library should allow to specify a proxy without env vars

Open LsKoder opened this issue 4 years ago • 0 comments

The unique way we have to use a proxy for PubSub Client is to set https_proxy over env variable. This is a limit for this library because it could generate a conflict with other libraries that use the same logic. We should be able to specify the proxy only for a specific service (like google), not globally.

A way to set https proxy should be allowed directly into constructor PubSub(). Please add a proxy option into ClientConfig configuration. Eg.

export interface ClientConfig extends gax.GrpcClientOptions {
    apiEndpoint?: string;
    servicePath?: string;
    port?: string | number;
    sslCreds?: gax.grpc.ChannelCredentials;
    proxyHttps?: string; // new parameter suggested
}

Thanks

LsKoder avatar Jan 27 '22 11:01 LsKoder