proxy progress

This commit is contained in:
rusefi 2020-07-17 22:56:32 -04:00
parent fed94f2147
commit 607152a702
2 changed files with 4 additions and 4 deletions

View File

@ -203,7 +203,7 @@ public class ServerTest {
// start authenticator // start authenticator
int authenticatorPort = 7004; // local port on which authenticator accepts connections from Tuner Studio int authenticatorPort = 7004; // local port on which authenticator accepts connections from Tuner Studio
LocalApplicationProxy.startAndRun(logger, controllerPort, applicationRequest, authenticatorPort); LocalApplicationProxy.startAndRun(logger, serverPortForRemoteUsers, applicationRequest, authenticatorPort);
CountDownLatch connectionEstablishedCountDownLatch = new CountDownLatch(1); CountDownLatch connectionEstablishedCountDownLatch = new CountDownLatch(1);

View File

@ -21,12 +21,12 @@ public class LocalApplicationProxy {
} }
/** /**
* @param serverPortForRemoteUsers port on which rusEFI proxy accepts authenticator connections
* @param applicationRequest remote session we want to connect to * @param applicationRequest remote session we want to connect to
* @param authenticatorPort local port we would bind for TunerStudio to connect to * @param authenticatorPort local port we would bind for TunerStudio to connect to
* @param authenticatorToProxyStream
*/ */
static void startAndRun(Logger logger, int controllerPort, ApplicationRequest applicationRequest, int authenticatorPort) throws IOException { static void startAndRun(Logger logger, int serverPortForRemoteUsers, ApplicationRequest applicationRequest, int authenticatorPort) throws IOException {
IoStream authenticatorToProxyStream = new TcpIoStream(logger, SSLSocketFactory.getDefault().createSocket(NetworkConnector.RUSEFI_PROXY_HOSTNAME, controllerPort)); IoStream authenticatorToProxyStream = new TcpIoStream(logger, SSLSocketFactory.getDefault().createSocket(NetworkConnector.RUSEFI_PROXY_HOSTNAME, serverPortForRemoteUsers));
LocalApplicationProxy localApplicationProxy = new LocalApplicationProxy(logger, applicationRequest); LocalApplicationProxy localApplicationProxy = new LocalApplicationProxy(logger, applicationRequest);
localApplicationProxy.run(authenticatorToProxyStream); localApplicationProxy.run(authenticatorToProxyStream);