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

Open
#2,248 2 comments 0 reactions 1 assignee View on GitHub

@NghiaTranUIT is already working on this.

Since Feb 16, 2025.

bug
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

  1. Bootstrap a Java program with org.java_websocket
  2. 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)
  3. 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
  4. 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

Image

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.