|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.i2p.sam.SAMBridge
public class SAMBridge
SAM bridge implementation.
Nested Class Summary | |
---|---|
(package private) static class |
SAMBridge.HelpRequested
|
Field Summary | |
---|---|
protected static String |
DEFAULT_DATAGRAM_HOST
|
protected static String |
DEFAULT_DATAGRAM_PORT
|
static String |
DEFAULT_SAM_KEYFILE
|
protected static String |
DEFAULT_TCP_HOST
|
protected static String |
DEFAULT_TCP_PORT
|
static String |
PROP_DATAGRAM_HOST
|
static String |
PROP_DATAGRAM_PORT
|
static String |
PROP_TCP_HOST
|
static String |
PROP_TCP_PORT
|
Constructor Summary | |
---|---|
SAMBridge(String listenHost,
int listenPort,
Properties i2cpProps,
String persistFile)
Build a new SAM bridge. |
Method Summary | |
---|---|
void |
addKeystream(String name,
String stream)
Specify that the given keystream should be used for the given name |
Destination |
getDestination(String name)
Retrieve the destination associated with the given name |
String |
getKeystream(String name)
Retrieve the I2P private keystream for the given name, formatted as a base64 string (Destination+PrivateKey+SessionPrivateKey, as I2CP stores it). |
static void |
main(String[] args)
Usage: |
void |
run()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_SAM_KEYFILE
public static final String PROP_TCP_HOST
public static final String PROP_TCP_PORT
protected static final String DEFAULT_TCP_HOST
protected static final String DEFAULT_TCP_PORT
public static final String PROP_DATAGRAM_HOST
public static final String PROP_DATAGRAM_PORT
protected static final String DEFAULT_DATAGRAM_HOST
protected static final String DEFAULT_DATAGRAM_PORT
Constructor Detail |
---|
public SAMBridge(String listenHost, int listenPort, Properties i2cpProps, String persistFile)
listenHost
- hostname to listen for SAM connections on ("0.0.0.0" for all)listenPort
- port number to listen for SAM connections oni2cpProps
- set of I2CP properties for finding and communicating with the routerpersistFile
- location to store/load named keys to/from
RuntimeException
- if a server socket can't be openedMethod Detail |
---|
public Destination getDestination(String name)
name
- name of the destination
public String getKeystream(String name)
name
- Name of the destination
public void addKeystream(String name, String stream)
name
- Name of the destinationstream
- Name of the streampublic static void main(String[] args)
SAMBridge [ keyfile [listenHost ] listenPort [ name=val ]* ]or:
SAMBridge [ name=val ]*name=val options are passed to the I2CP code to build a session, allowing the bridge to specify an alternate I2CP host and port, tunnel depth, etc.
args
- [ keyfile [ listenHost ] listenPort [ name=val ]* ]public void run()
run
in interface Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |