forked from I2P_Developers/i2p.i2p
allow the user to override the I2CP options (exposed on the command line, ala
SAMBridge [[listenHost ]listenPort[ name=val]*] where listenHost defaults to localhost, listenPort defaults to 7656, and name=val can be the I2CP options to override (e.g. i2cp.tcp.host=localhost i2cp.tcp.port=4001)
This commit is contained in:
@@ -31,10 +31,11 @@ public class SAMHandlerFactory {
|
||||
* required by the client.
|
||||
*
|
||||
* @param s Socket attached to SAM client
|
||||
* @param i2cpProps config options for our i2cp connection
|
||||
*
|
||||
* @return A SAM protocol handler
|
||||
*/
|
||||
public static SAMHandler createSAMHandler(Socket s) throws SAMException {
|
||||
public static SAMHandler createSAMHandler(Socket s, Properties i2cpProps) throws SAMException {
|
||||
BufferedReader br;
|
||||
String line;
|
||||
StringTokenizer tok;
|
||||
@@ -127,7 +128,7 @@ public class SAMHandlerFactory {
|
||||
try {
|
||||
switch (verMajor) {
|
||||
case 1:
|
||||
handler = new SAMv1Handler(s, verMajor, verMinor);
|
||||
handler = new SAMv1Handler(s, verMajor, verMinor, i2cpProps);
|
||||
break;
|
||||
default:
|
||||
_log.error("BUG! Trying to initialize the wrong SAM version!");
|
||||
|
||||
Reference in New Issue
Block a user