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

support tls fingerprint args in constructor #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

landonsilla
Copy link

hey nate! first off big thanks for this package. it has been incredibly valuable for project.

I'm wanting to include the tls ciphers list (and other, similar params) on the agent constructor:

new HttpsProxyAgent('http://user:pass@$example.com:1234' {
  rejectUnauthorized: false,
  ciphers: [
    'ECDHE-ECDSA-AES128-GCM-SHA256',
    'ECDHE-RSA-AES128-GCM-SHA256',
    'ECDHE-ECDSA-AES256-GCM-SHA384',
    'ECDHE-RSA-AES256-GCM-SHA384',
    'DHE-RSA-AES128-GCM-SHA256',
    'DHE-RSA-AES256-GCM-SHA384'
    ].join(':'),
    honorCipherOrder: true,
    secureProtocol: 'TLSv1_2_method',
})

(Btw, i am making GETs to https://check.ja3.zone/ to check if the fingerprint is changing, e.g. the ciphers declaration is effective)

I found that the ciphers, honorCipherOrder, secureProtocol params don't make it to the base http.Agent object, which is needed to have the effect I'm looking for. And, including the constructor opts in the this.options seems to do the trick.

I'll be honest, I don't deeply understand this code. I just know that this code diff has the affect i desire. Perhaps there are keys that should/should not be here???? Perhaps you want a blacklist or whitelist strategy? I see you have the omit function to remove things. I don't have a strong preference on this stuff, I just want ciphers, honorCipherOrder, secureProtocol (and secureOptions) to be included in this.options.

Thanks again! I hope this is helpful.

including constuctor opts into super opts
Copy link

changeset-bot bot commented Aug 7, 2024

⚠️ No Changeset found

Latest commit: ffc3fa8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Aug 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
proxy-agents ✅ Ready (Inspect) Visit Preview Aug 7, 2024 7:39pm

@landonsilla landonsilla changed the title Update index.ts support tls fingerprint args in constructor Aug 7, 2024
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.

1 participant