Hi Zhenyu,
I think the easiest way to realise proxy support is writing your own
TransportMapping class. Probably you can subclass one of the
abstract implementations.
Best regards,
Frank
> On 28 Sep 2016, at 01:37, Zhenyu Zhou wrote:
>
> Hello,
>
> I'm looking for a java library for SNMP and find SNMP4J is the leading one.
> It satisfied all my requirements (eg. multithread) except for I'd like to
> put the traffic through a proxy before the request reaches device.
>
> The proxy is a normal HTTP proxy: the client connects to it and sends a
> CONNECT request such as "CONNECT : HTTP/1.1". Then all following
> traffic within this channel will be redirected.
>
> My question is, does anyone have any insights whether this is doable to add
> this feature to SNMP4J library (my gut feeling is doable)? I feel confused
> because I don't find where the code actively establishes a TCP connection
> with the device - the socket seems to be created at `ServerThread.run()`
> but it is server-side code (I guess it's for TRAP). So where might be the
> correct place to change the address to proxy's and establish the connection
> with proxy meanwhile? It might be somewhere that the code acts as a client
> to connect to the device for POLL.
>
> Thanks in advance! Sorry for the kind of complex description and feel free
> to ask me to clarify anything here.
>
> Best Regards!
>
> Zhou, Zhenyu
> ___
> SNMP4J mailing list
> SNMP4J@agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j
___
SNMP4J mailing list
SNMP4J@agentpp.org
https://oosnmp.net/mailman/listinfo/snmp4j