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

cronet build is removed? #471

Closed
binarycraft007 opened this issue Mar 6, 2023 · 9 comments
Closed

cronet build is removed? #471

binarycraft007 opened this issue Mar 6, 2023 · 9 comments

Comments

@binarycraft007
Copy link

I am trying to write naiveproxy in zig with libcronet, but it seems that libcronet has been removed from the lastest releases.

@klzgrad
Copy link
Owner

klzgrad commented Mar 7, 2023

Use this old build for testing purposes https://github.com/klzgrad/naiveproxy/releases/tag/v106.0.5249.91-3

The cronet release was discontinued because cronet-go was not maintained and used.
If you can prove you will maintain downstream packages based on libcronet this can be reconsidered.

@binarycraft007
Copy link
Author

Use this old build for testing purposes https://github.com/klzgrad/naiveproxy/releases/tag/v106.0.5249.91-3

The cronet release was discontinued because cronet-go was not maintained and used. If you can prove you will maintain downstream packages based on libcronet this can be reconsidered.

thanks

@klzgrad klzgrad closed this as completed Mar 7, 2023
@binarycraft007
Copy link
Author

binarycraft007 commented Mar 7, 2023

Use this old build for testing purposes https://github.com/klzgrad/naiveproxy/releases/tag/v106.0.5249.91-3

The cronet release was discontinued because cronet-go was not maintained and used. If you can prove you will maintain downstream packages based on libcronet this can be reconsidered.

ported cronet go example to zig: https://github.com/binarycraft007/cronet-zig

it's working now, next step is to port a socks5 tunnel for it and add padding and other stuff.

❯ zig-out/bin/cronet https://www.google.com
info: on_stream_ready_callback
info: on_response_headers_received, negotiated_protocol=h2
info: :status: 302
info: location: https://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=https://www.google.com.hk/&ust=1678176669813955&usg=AOvVaw3UKIjLFXVbiVOM6Vwy1yJI
info: cache-control: private
info: content-type: text/html; charset=UTF-8
info: p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
info: date: Tue, 07 Mar 2023 08:10:39 GMT
info: server: gws
info: content-length: 372
info: x-xss-protection: 0
info: x-frame-options: SAMEORIGIN
info: set-cookie: 1P_JAR=2023-03-07-08; expires=Thu, 06-Apr-2023 08:10:39 GMT; path=/; domain=.google.com; Secure
info: set-cookie: AEC=ARSKqsLPDfjc_8hvNqjv8jdQI6FFflKa6EgIDbxEvi0HW3OJT0qbIpUlcg; expires=Sun, 03-Sep-2023 08:10:39 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
info: set-cookie: NID=511=h2Lwe0auofyl8DaKJYpf2n0AisRi55W0b37NMvX-Pr8Sas7XsZDJzVIG-VkWJfD-HWwqmeVroF0rk0mqH6DjkwceSlgp8Azxznc4E9IcAgP1cRtZiSsYvupvMn65LPJJ4ILMA3AsGP2G0Ipk34diWOCPzyc3R70VadqYRj5YQWg; expires=Wed, 06-Sep-2023 08:10:39 GMT; path=/; domain=.google.com; HttpOnly
info: alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
info: on_read_completed
info: <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com.hk/url?sa=p&amp;hl=zh-CN&amp;pref=hkredirect&amp;pval=yes&amp;q=https://www.google.com.hk/&amp;ust=1678176669813955&amp;usg=AOvVaw3UKIjLFXVbiVOM6Vwy1yJI">here</A>.
</BODY></HTML>

info: on_read_completed
info: <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="https://www.google.com.hk/url?sa=p&amp;hl=zh-CN&amp;pref=hkredirect&amp;pval=yes&amp;q=https://www.google.com.hk/&amp;ust=1678176669813955&amp;usg=AOvVaw3UKIjLFXVbiVOM6Vwy1yJI">here</A>.
</BODY></HTML>

info: on_succeded

@klzgrad
Copy link
Owner

klzgrad commented Mar 7, 2023

Nice work. But I don't think I will make cronet releases for zig alone. Cronet-go had the potential to integrate with many go based network tools nicely but it was hampered by difficult CGO cross compile setup. Zig doesn't seem to have a large enough community to have enough users for cronet zig. A hobby maybe.

@triggered96
Copy link

Can cronet support http1.0 requests? I tried turning off http2, but unexpectedly the request cannot be made. @binarycraft007 also verified this.

@sleeyax
Copy link

sleeyax commented Nov 25, 2023

I continued where Naive v106.0.5249.91-3 left off here: https://github.com/sleeyax/cronet-binaries/releases.

Builds start from Chromium v119.0.6045.66 and have the latest Naive patches applied. Keep in mind that these builds don't include Naive Proxy binaries, tests or go files. It's just stable cronet binaries for all platforms + patches.

@klzgrad
Copy link
Owner

klzgrad commented Dec 2, 2023

If the cronet builds do have serious users, it's better to maintain it in here long term with lower upgrade friction. So far I haven't seen the sign of serious use though.

@labac-p
Copy link

labac-p commented Dec 14, 2023

@sleeyax This is awesome 🤩 Please keep it upstream with naiveproxy version (chrome version).

@sleeyax
Copy link

sleeyax commented Dec 14, 2023

@sleeyax This is awesome 🤩 Please keep it upstream with naiveproxy version (chrome version).

Sure that's the plan. At the time of writing we're only missing a bot to auto-import new Chrome versions as soon as a new version releases. It requires manual intervention for now.

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

5 participants