Menu

Netlib Java Adapter

Tobias Boese

Netlib Java Adapter

Abstract: Netlib Java Adapter combines all redirection technologies of Netlib, i.e. it redirects the complete client-side TCP/IP network traffic and all (DNS) name service requests of a JVM.

Introduction

This page describes the mode of operation of org.silvertunnel_ng.netlib.adapter.java.JvmGlobalUtil.

JvmGlobalUtil redirects the complete client-side TCP/IP network traffic and all (DNS) name service requests of a JVM. It combines the features of [Netlib Socket Adapter], [Netlib URL Adapter] and [Netlib Name Service Adapter].

Hint: Currently, only client-side network traffic will be redirected by this adapter.

Usage

  • initial setup:

    // enable redirection (globally for the complete JVM)
    JvmGlobalUtil.init();
    
    // select the NetLayer implementation that should be used;
    //   default is TcpipNetLayer with NetLayerIDs.TCPIP;
    //   here we set TorNetLayer with NetLayerIDs.TOR:
    NetLayer netLayer = NetFactory.getInstance().getNetLayerById(NetLayerIDs.TOR);
    
    // wait (block the current thread) until this netLayer instance is up and ready and
    // redirect to the selected netLayer and its corresponding name service implementation
    JvmGlobalUtil.setNetLayerAndNetAddressNameService(netLayer, true);
    
  • use everything of the Java API in same same way as without Netlib:

        ...


Top: [Netlib], Up: [Netlib Adapters], Next: [Netlib Command Line Tools]


Related

Wiki: Netlib Adapters
Wiki: Netlib Best Practices
Wiki: Netlib Command Line Tools
Wiki: Netlib Name Service Adapter
Wiki: Netlib Socket Adapter
Wiki: Netlib URL Adapter
Wiki: Netlib

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.