ProxymanApp / ProxymanApp/Proxyman
Proxyman seems to not pick up on TLS SNI. No subject alternative DNS name matching stream.data.sandbox.alpaca.markets found in Java
@NghiaTranUIT is already working on this.
Since Feb 16, 2025.
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Description
Trying to interface with the Alpaca markets API in Java for a project. Using org.java_websocket, I attempt to connect to the API with the Proxy setup in code, and I've gotten many errors so far, thus far I've had the infamous Sun path building error that's experienced here https://github.com/ProxymanApp/Proxyman/issues/569#issuecomment-723588490, and after some trial and error I manually used keytool to import Proxyman's CA certificate to Java. But now the error results in a Error: No subject alternative DNS name matching stream.data.sandbox.alpaca.markets found. being printed and the program exiting. In Proxyman, I see the failed attempts, but it seems to be unable to pick up on the TLS SNI, and I believe Proxyman is able to serve a certificate with the correct SAN.
Steps to Reproduce
- Bootstrap a Java program with org.java_websocket
- Use example https://github.com/TooTallNate/Java-WebSocket/blob/master/src/main/example/CustomHeaderClientExample.java and https://github.com/TooTallNate/Java-WebSocket/blob/master/src/main/example/ExampleClient.java as boilerplate and try to connect to
stream.data.sandbox.alpaca.markets(No need to sign up and authenticate) - Find that Java doesn't respect system proxies, so populate JVM cacert with Proxyman cert and setup proxy in code with https://github.com/TooTallNate/Java-WebSocket/wiki/Using-the-WebSocket-through-a-http-proxy
- Get the error
Error: No subject alternative DNS name matching stream.data.sandbox.alpaca.markets found.
Current Behavior
It seems that Proxyman is unable to pick up on TLS SNI and isn't generating proper TLS certificate
As seen in screenshot, I get https://IP-ADDRESS rather than https://DOMAIN, so I wonder if Proxyman is correctly picking up on TLS SNI
N.B.: I have tried using a Map Remote to get Proxyman to pickup on the correct Host, but this doesn't seem to work
Expected Behavior
For Java to work
Environment
- App version: Proxyman 5.15.0
- macOS version: macOS Sequoia 15.3
- JVM Distribution & Version: Azul 21.0.6 (Installed at
/Users/robigan/Library/Java/JavaVirtualMachines/azul-21.0.6/Contents/Home) - Gradle version: 8.8 (Using Java Azul 21.0.6)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.