[
https://issues.apache.org/jira/browse/TINKERPOP-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17012138#comment-17012138
]
Stephen Mallette commented on TINKERPOP-2158:
---------------------------------------------
I think about this one from time to time. I think that this feature is best
implemented by users to meet the exact needs they may have. We have the
framework necessary for allowing that already I think. Users would simply
implement their own {{Channelizer}} implementation - i.e. extend
{{Channelizer.WebSocketChannelizer}}. Then it would just be a matter of
overriding {{configure(ChannelPipeline)}} to add the [Netty proxy
handler|https://netty.io/4.1/api/io/netty/handler/proxy/package-summary.html]
required by the environment. I'd think it to be something like:
{code}
@Override
public void configure(ChannelPipeline pipeline) {
pipeline.addFirst(new Socks5ProxyHandler(new
InetSocketAddress(socksProxyHost, socksProxyPort)));
super.configure(pipeline);
}
{code}
Then once that custom {{Channelizer}} is ready, just configure the {{Cluster}}
with it on construction using the {{channelizer(Class)}} builder method or in
the case of the Gremlin Console, just compile the custom {{Channelizer}} to a
jar, put it on the Gremlin Console path and then modify the configuration file
to use that new channelizer, like:
{code}
hosts: [localhost]
port: 8182
serializer: { className:
org.apache.tinkerpop.gremlin.driver.ser.GraphBinaryMessageSerializerV1, config:
{ serializeResultToString: true }}
connectionPool: { channelizer: com.mycompany.MyProxyChannelizer }
{code}
> Provide the means to specify a corporate proxy for gremlin console and Java
> SDK
> -------------------------------------------------------------------------------
>
> Key: TINKERPOP-2158
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2158
> Project: TinkerPop
> Issue Type: Improvement
> Components: driver
> Affects Versions: 3.3.5
> Reporter: William T Flanders
> Priority: Major
>
> Need the ability to configure a proxy address so that the Gremlin Console,
> and apps using the Java SDK, can connect when ran behind a corporate proxy.
> See [https://groups.google.com/forum/#!topic/gremlin-users/kiB13cUPUWg]
> TIA.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)