Ngrok public IP output improved

pull/20/head
pabloFuente 2017-09-13 10:10:05 +02:00
parent 113f8fdaa8
commit 494da316c5
1 changed files with 7 additions and 6 deletions

View File

@ -154,12 +154,13 @@ public class OpenViduServer implements JsonRpcConfigurer {
if (openviduConf.getOpenViduPublicUrl().equals("ngrok")) { if (openviduConf.getOpenViduPublicUrl().equals("ngrok")) {
try { try {
NgrokController ngrok = new NgrokController(); NgrokController ngrok = new NgrokController();
System.out.println(); final String NEW_LINE = System.getProperty("line.separator");
System.out.println(" PUBLIC IP "); String str = NEW_LINE +
System.out.println("-------------------------"); " PUBLIC IP " + NEW_LINE +
System.out.println(ngrok.getNgrokAppUrl()); "-------------------------" + NEW_LINE +
System.out.println("-------------------------"); ngrok.getNgrokAppUrl() + NEW_LINE +
System.out.println(); "-------------------------" + NEW_LINE;
System.out.println(str);
OpenViduServer.publicUrl = ngrok.getNgrokServerUrl().replaceFirst("https://", "wss://"); OpenViduServer.publicUrl = ngrok.getNgrokServerUrl().replaceFirst("https://", "wss://");
} catch (Exception e) { } catch (Exception e) {
System.out.println(" No ngrok connection "); System.out.println(" No ngrok connection ");