ProxymanApp / Proxyman

Modern. Native. Delightful Web Debugging Proxy for macOS, iOS, and Android ⚡️
https://proxyman.io
5.52k stars 182 forks source link

Software crashes when ending a java application #2090

Open oxcz opened 2 months ago

oxcz commented 2 months ago

Description

Software crashes when ending a java application

Steps to Reproduce

1.Starting a java application,connecting with scoks5 java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=8889 -DsocksNonProxyHosts="localhost|127.0.0.1|192.168.99.151|43.143.243.117|8.142.73.178|etax.hebei.chinatax.gov.cn" -Dhttp.nonProxyHosts="localhost|127.0.0.1|43.143.243.117|8.142.73.178|etax.hebei.chinatax.gov.cn" -jar test.jar --spring.profiles.active=prod

image

2.End this application

image

3.Software crashes

image

Current Behavior

Software crashes

Expected Behavior

Software up and running

Environment

NghiaTranUIT commented 2 months ago

@oxcz from what I see, it crashes because Proxyman can't get the host from your SOCKS IPv6.

May I ask what is your SOCK Proxy setting in the Tools -> Proxy Setting -> SOCKS Proxy ?

I'd like to investigate it

oxcz commented 2 months ago

@oxcz from what I see, it crashes because Proxyman can't get the host from your SOCKS IPv6.

May I ask what is your SOCK Proxy setting in the Tools -> Proxy Setting -> SOCKS Proxy ?

I'd like to investigate it

Are you referring to the socks5 proxy for the java startup command, or the system proxy? -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=8889

The system agent is using Surge's enhanced mode. ipv6 is not enabled.

NghiaTranUIT commented 2 months ago

@oxcz can you guide me how to setup this:

1.Starting a java application,connecting with scoks5
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=8889 -DsocksNonProxyHosts="localhost|127.0.0.1|192.168.99.151|43.143.243.117|8.142.73.178|etax.hebei.chinatax.gov.cn" -Dhttp.nonProxyHosts="localhost|127.0.0.1|43.143.243.117|8.142.73.178|etax.hebei.chinatax.gov.cn" -jar test.jar --spring.profiles.active=prod

I'd like to reproduce it and try to fix the crash

oxcz commented 2 months ago

SpringBootDemot-0.0.1-SNAPSHOT.jar.zip You can unzip this zip file and run the jar file in it for testing, or you can create a new spring boot project yourself. Open proxyman and run the following command. java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=8889 - DsocksNonProxyHosts=“localhost|127.0.0.1|192.168.99.151” -Dhttp.nonProxyHosts=“localhost|127.0.0.1” -jar SpringBootDemot-0.0.1- SNAPSHOT.jar

This jar requires jdk 17

oxcz commented 2 months ago

@oxcz can you guide me how to setup this:

1.Starting a java application,connecting with scoks5
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -DsocksProxyHost=127.0.0.1 -DsocksProxyPort=8889 -DsocksNonProxyHosts="localhost|127.0.0.1|192.168.99.151|43.143.243.117|8.142.73.178|etax.hebei.chinatax.gov.cn" -Dhttp.nonProxyHosts="localhost|127.0.0.1|43.143.243.117|8.142.73.178|etax.hebei.chinatax.gov.cn" -jar test.jar --spring.profiles.active=prod

I'd like to reproduce it and try to fix the crash

I replied to you above.

NghiaTranUIT commented 2 months ago

Sorry, I can't run your JAR file because it's too risky. Do you have alternative way to reproduce it?

May I ask:

  1. On Proxyman, do you use External Proxy for SOCKS Proxy, that point your SOCKS server at 127.0.0.1:8889 ?
NghiaTranUIT commented 2 months ago

Sorry, please ignore my previous comment.

From what I see, the crash happens when we start a SOCKS proxy server on Proxyman.

Do you use SOCKS Proxy on Proxyman (In Tool menu -> Proxy Setting -> SOCKS Proxy)?

NghiaTranUIT commented 2 months ago

@oxcz let's try this beta build: https://download.proxyman.io/beta/Proxyman_5.6.1_Fix_socks_proxy_crashes.dmg

and share with me the result 👍

oxcz commented 2 months ago

@oxcz let's try this beta build: https://download.proxyman.io/beta/Proxyman_5.6.1_Fix_socks_proxy_crashes.dmg

and share with me the result 👍

It's still crashing, I'm using the setapp version and I'm not sure the replacement worked 1.log

oxcz commented 2 months ago

@oxcz let's try this beta build: https://download.proxyman.io/beta/Proxyman_5.6.1_Fix_socks_proxy_crashes.dmg

and share with me the result 👍

I also lost my activation status.

oxcz commented 1 month ago

@NghiaTranUIT Can you read the question above?

NghiaTranUIT commented 1 month ago

@oxcz let's try this build: https://download.proxyman.io/beta/Proxyman_Setapp_fix_crash_socks_proxy.zip