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

TLS client protocol does not seem to be properly set from config #280

Closed
mspublic opened this issue Aug 14, 2024 · 8 comments
Closed

TLS client protocol does not seem to be properly set from config #280

mspublic opened this issue Aug 14, 2024 · 8 comments
Milestone

Comments

@mspublic
Copy link
Contributor

mspublic commented Aug 14, 2024

I am trying to set the tls client protocol for outgoing requests (that are intercepted) the value does not appear to be respected. For example I set it to tls1.2 but when I test with https://browserleaks.com/tls it always shows 1.3. This happens with openssl and boringssl. Example config:

- name: proxy
    escaper: default
    auditor: default
    type: http_proxy
    listen:
      address: "[::]:4000"
    tls_client:
      protocol: tls1.2
@zh-jq-b
Copy link
Member

zh-jq-b commented Aug 15, 2024

The tls_client config here only affect https_forward requests. Currently we don't support set outgoing tls protocol versions in tls interception.

@zh-jq
Copy link
Collaborator

zh-jq commented Aug 15, 2024

To support custom TLS client config for HTTP CONNECT requests, you need to use user-site config.
Add the following to main.yaml:

user-group:
 - name: default
   anonymous_user:
     name: anonymous
     audit:
       enable_protocol_inspection: true
     explicit_sites:
       - id: browserleaks
         exact_match: browserleaks.com
         tls_client:
           protocol: tls1.2

And you need to change the http_proxy server config to include user-group: default.
All requests without user auth information will match that anonymous_user config.
(This will also overwrite the tls client config at server side for https_forward requests)

@mspublic
Copy link
Contributor Author

Thanks! I will give it a try. Does it require setting explicit sites or can it be used across all?

@zh-jq
Copy link
Collaborator

zh-jq commented Aug 15, 2024

It only work for the matched sites.

@mspublic
Copy link
Contributor Author

Could this be a feature request in the future? Thanks!

@zh-jq
Copy link
Collaborator

zh-jq commented Aug 22, 2024

It's possible but I'm wondering whether it's really needed for all tls connections.

@mspublic
Copy link
Contributor Author

We use it to match certain browser configs - similar to #138.

@zh-jq zh-jq added this to the g3proxy v1.10 milestone Aug 24, 2024
@zh-jq-b
Copy link
Member

zh-jq-b commented Sep 4, 2024

You can set max/min tls version after this commit e9b41b6

@zh-jq-b zh-jq-b closed this as completed Sep 4, 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

No branches or pull requests

3 participants