-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from UnfamiliarLegacy/fix/nitro-socket-replac…
…ement Improve Nitro socket url matching
- Loading branch information
Showing
7 changed files
with
105 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...rth/src/main/java/gearth/protocol/connection/proxy/nitro/http/NitroSslContextFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package gearth.protocol.connection.proxy.nitro.http; | ||
|
||
import org.eclipse.jetty.util.ssl.SslContextFactory; | ||
|
||
import javax.net.ssl.SSLEngine; | ||
|
||
public class NitroSslContextFactory extends SslContextFactory.Server { | ||
|
||
private final NitroCertificateSniffingManager certificateManager; | ||
|
||
public NitroSslContextFactory(NitroCertificateSniffingManager certificateManager) { | ||
this.certificateManager = certificateManager; | ||
} | ||
|
||
@Override | ||
public SSLEngine newSSLEngine(String host, int port) { | ||
System.out.printf("[NitroSslContextFactory] Creating SSLEngine for %s:%d%n", host, port); | ||
return certificateManager.websocketSslEngine(host); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters