Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINA proxy handshake fix and proxy integration tests #833

Merged
merged 4 commits into from
Jun 29, 2024

Conversation

the-thing
Copy link
Contributor

Changes

  • added custom SSL wrapper to fix proxy connectivity before official MINA patch
  • removed unused PROXY protocol type
  • added SOCKS proxy server (via Netty)
  • added Maven build extension to help build tests using Netty
  • added SSL and non-SSL integration tests

@the-thing the-thing changed the title FIxed proxy connectivity Mina proxy handshake fix and proxy integration tests Jun 26, 2024
@chrjohn
Copy link
Member

chrjohn commented Jun 26, 2024

@the-thing , thanks for the PR 👍
On another note: do you know if #631 could be related?

@chrjohn chrjohn added this to the QFJ 3.0.0 milestone Jun 26, 2024
@the-thing
Copy link
Contributor Author

the-thing commented Jun 26, 2024

That's a different problem and not related to the current MINA issue.

https://github.com/apache/mina/blob/2.2.X/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/HttpSmartProxyHandler.java

When MINA's HTTP proxy handler does the handshake, the proxy server can respond with "407 - Proxy Authentication Required" status code which will make MINA's handler to automatically switch and choose HTTP auth method based on the response (no-auth, ntlm, digest and basic) and populate headers. However, I assume this might not be the case for all HTTP proxy servers and some some of them might require you to know the auth method in advance and you must ensure that headers are already populated. Hence the fix is required.

I think #631 looks reasonable, but we don't have HTTP tests yet so we don't know if this works. Also one thing about PR - the auth method is chosen based on properties provided, but I have a feeling that HTTP auth method should be configured explicitly.

@chrjohn
Copy link
Member

chrjohn commented Jun 27, 2024

I suppose this is ready to merge?
Thank you as always 👍

@the-thing
Copy link
Contributor Author

the-thing commented Jun 27, 2024

Yes, it is. No problem.

BTW. Is VM_PIPE still supported and working?

@chrjohn
Copy link
Member

chrjohn commented Jun 27, 2024

It was used for unit tests some time ago and works AFAICT. I only had the suspicion that it sometimes hung the connector during the acceptance test run where the connectorwas started and stopped in quick succession. But I never followed it up.

@the-thing
Copy link
Contributor Author

I was just wondering if this should be removed at some point. I have a feeling that nobody uses it.

@chrjohn
Copy link
Member

chrjohn commented Jun 27, 2024

Is it complicating the code much? I don't know if it has performance benefits when connecting intra VM. It was said it has but that was some years ago.

@the-thing
Copy link
Contributor Author

the-thing commented Jun 27, 2024

I don't think so, but could be slightly cleaner. Functionally it might have some benefits, but I don't really know how this works. I was more thinking about removing so "SocketConnectProtocol" parameter goes away and we end up with less config. Still probably not a target for this PR.

@chrjohn chrjohn merged commit 3427f08 into quickfix-j:master Jun 29, 2024
12 checks passed
@the-thing the-thing deleted the proxy_testing branch June 29, 2024 16:31
@chrjohn
Copy link
Member

chrjohn commented Jun 30, 2024

Maybe we could (if it is not already the case in the code) assume TCP as default so one does not explicitly need to define the parameter.

@chrjohn chrjohn changed the title Mina proxy handshake fix and proxy integration tests MINA proxy handshake fix and proxy integration tests Oct 15, 2024
@the-thing the-thing mentioned this pull request Dec 30, 2024
chrjohn added a commit that referenced this pull request Jan 7, 2025
Mina proxy handshake fix and proxy integration tests

(cherry picked from commit 3427f08)
@chrjohn chrjohn modified the milestones: QFJ 3.0.0, QFJ 2.3.2 Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants