Giter Site home page Giter Site logo

sleeyax / cronet-binaries Goto Github PK

View Code? Open in Web Editor NEW
13.0 1.0 7.0 44.87 MB

Cross-platform binaries for cronet (Chromium Network Stack)

License: BSD 3-Clause "New" or "Revised" License

Python 14.34% C++ 81.42% Assembly 0.02% C 1.40% Objective-C++ 1.35% Objective-C 0.32% Pawn 0.01% nesC 0.04% JavaScript 0.03% Shell 0.41% Jinja 0.02% Java 0.08% HTML 0.04% Makefile 0.01% Starlark 0.37% Handlebars 0.01% Rust 0.06% sed 0.01% POV-Ray SDL 0.09% TypeScript 0.01%
cronet naive naive-proxy

cronet-binaries's Introduction

Note

Don't fall victim to impersonation attempts. Verify my identity here.

โ“ About Me

I'm a Full Stack Software Engineer who loves to both break and build the web. Ever since I started programming I've had a particular interest in web scraping, automation, bots and security for which I've grown an expertise. Some may recognize me from my contributions in a time where sneaker bots were still cool (see projects below). The other side of me loves to develop web applications, always contemplating the most optimal solution.

Besides my main occupation, I'm interested in other fields such as (but not limited to) cross-platform mobile app development, reverse engineering, GNU/Linux, Containers, DevOps and cloud.

If you'd like to hire me or if you're looking for a partner for your next project, check out my socials and shoot me a DM.

I'm also active on GitLab.

๐Ÿ’ป Projects and Companies

Present

  • 2024 -> ... : Open source development. See my latest projects below. Stay tuned and consider becoming a sponsor! ๐Ÿ‘€
  • July 2023 -> ... : All in one dating app automation suite for OFM (feat. snkr friends). ๐Ÿ˜

Past

  • 2023: Stremio media player & content aggregator
    • Bootstrapped a fresh mobile app for Android and iOS using Kotlin & Compose
  • 2022: Pixl NFT marketplace (formerly known as flow.so and infinity.xyz) to trade digital assets on the ETH blockchain
  • 2019 -> 2021: Cybersole AIO (All In One) web automation software to automatically purchase online items (shoes, clothing, collectibles)
    • Wrote and maintained site modules
    • Reverse engineered all kinds of antibot and WAFs - including mobile versions
  • 2019: Ignite another AIO bot company
    • Rewrote most of the codebase from JavaScript spaghetti code to a modular TypeScript codebase and migrated from plain CSS to SCSS modules
  • 2018 -> ... : Stremio Community media player & content aggregator
  • 2017-2018: Fiverr where it all began...

๐Ÿ‘‹ Socials

You can reach out to me via one of the following channels:

Please email me if your inquiry is urgent.

Do NOT contact me for personal support, feature requests, issues, suggestions etc. regarding any of my public GitHub repositories. Create an issue or start a discussion on the relevant repository instead.

๐Ÿ“ˆ Stats

Overview

github stats

Trophies

trophies

cronet-binaries's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cronet-binaries's Issues

[Need Help] Could I directly call libcronet.so from cronet-go?

I'm trying to directly call libcronet.so(extracted from https://github.com/sleeyax/cronet-binaries/releases/download/v119.0.6045.66/cronet-v119.0.6045.66-linux-x64.tar.xz) from cronet-go(https://github.com/SagerNet/cronet-go),
I've extracted cronet-v119.0.6045.66-linux-x64.tar.xz into /home/malcolm/cronet-v119.0.6045.66-linux-x64

and my cgo flags:
#cgo LDFLAGS: -fuse-ld=lld -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--icf=all -Wl,--color-diagnostics -Wl,-mllvm,-instcombine-lower-dbg-declare=0 -flto=thin -Wl,--thinlto-jobs=all -Wl,--thinlto-cache-dir=thinlto-cache -Wl,--thinlto-cache-policy=cache_size=10%:cache_size_bytes=40g:cache_size_files=100000 -Wl,-mllvm,-import-instr-limit=30 -fwhole-program -m64 -no-canonical-prefixes -rdynamic -Wl,-z,defs -Wl,--as-needed -Wl,--lto-O2 -pie -Wl,--disable-new-dtags -ldl -lpthread -lrt /home/malcolm/cronet-v119.0.6045.66-linux-x64/libcronet.so -Wl,-rpath,/home/malcolm/cronet-v119.0.6045.66-linux-x64

my test.go:

package main

import (
	"net/http"
	"os"
	"github.com/sagernet/cronet-go"
)


func main() {
	client := &http.Client{
		Transport: &cronet.RoundTripper{},
	}
	response, err := client.Get("https://www.google.com/ncr")
	if err != nil {
	}
	response.Write(os.Stderr)
	response.Body.Close()
}

but when I run "CGO_LDFLAGS_ALLOW=".*" go run test.go", it says:

runtime: pcHeader: magic= 0xfffffff1 pad1= 0 pad2= 0 minLC= 1 ptrSize= 8 pcHeader.textStart= 0x266180 text= 0x5644834fc180 pluginpath= 
fatal error: invalid function symbol table
runtime: panic before malloc heap initialized

runtime stack:
runtime.throw({0x56448332b4da?, 0x0?})
	/usr/local/go/src/runtime/panic.go:1658 +0x5c fp=0x7ffd2147f688 sp=0x7ffd2147f658 pc=0x56448353147c
runtime.moduledataverify1(0x8?)
	/usr/local/go/src/runtime/symtab.go:806 +0x816 fp=0x7ffd2147f7a8 sp=0x7ffd2147f688 pc=0x56448354ea16
runtime.moduledataverify(...)
	/usr/local/go/src/runtime/symtab.go:784
runtime.schedinit()
	/usr/local/go/src/runtime/proc.go:1085 +0x34 fp=0x7ffd2147f7f0 sp=0x7ffd2147f7a8 pc=0x564483534f94
runtime.rt0_go()
	/usr/local/go/src/runtime/asm_amd64.s:349 +0x11c fp=0x7ffd2147f7f8 sp=0x7ffd2147f7f0 pc=0x5644835605fc
exit status 2

Could I directly call libcronet.so from cronet-go?

How to use the shared library of Android version ?

As shown below, there seems to be no cronet symbol table in the android version of the shared library. How to call it?

U abort
         U __aeabi_memclr
         U __aeabi_memclr4
         U __aeabi_memclr8
         U __aeabi_memmove
         U __aeabi_memmove4
         U __aeabi_memset
         U android_set_abort_message
         U closelog
         U __ctype_get_mb_cur_max
         U __cxa_atexit
         U __cxa_finalize
         U __errno
         U fflush
         U fputc
         U fputwc
         U fwrite
         U getc
         U gettid
         U getwc
         U isdigit_l
         U islower_l
         U isupper_l
         U iswlower_l
         U isxdigit_l
         U madvise
         U mbrlen
         U memchr
         U memcmp
         U memcpy
         U memset
         U mmap
         U mprotect
         U munmap
         U __open_2
         U openlog
         U prctl
         U pthread_cond_broadcast
         U pthread_cond_wait
         U pthread_getspecific
         U pthread_key_create
         U pthread_key_delete
         U pthread_mutex_lock
         U pthread_mutex_unlock
         U pthread_once
         U pthread_setspecific
         U __read_chk
         U __register_atfork
         U snprintf
         U sscanf
         U __stack_chk_fail
         U __stack_chk_guard
         U stderr
         U stdin
         U stdout
         U strcmp
         U strftime_l
         U strlen
         U strstr
         U strtod
         U strtof
         U strtoll
         U strtoull
         U syscall
         U syslog
         U ungetc
         U ungetwc
         U vfprintf
         U vsnprintf
         U __vsnprintf_chk
         U vsscanf
         U wcslen
         U wmemchr

[Need help] Does the cronet-go support the 3rd param in http.NewRequest()?

I'm testing the following code,
if I commented "Transport: &cronet.RoundTripper{},", it can send data correctly,
but if I enable cronet.RoundTripper, the code won't print "entering read function", it stop there forever.

I know the cronet-binary works very well with full-body http post request(#1),
but do you know how to realize such data streaming with cronet?

package main

import (
    "fmt"
    "io"
    "log"
    "net/http"
    "time"

    "github.com/SagerNet/cronet-go"
)

type ChunkedReader struct {
    chunks  [][]byte
    delay   time.Duration
    index   int
}

func (r *ChunkedReader) Read(p []byte) (n int, err error) {
    log.Print("entering read function")
    if r.index >= len(r.chunks) {
        return 0, io.EOF
    }
    if r.index > 0 {
        time.Sleep(r.delay)
    }
    chunk := r.chunks[r.index]
    n = copy(p, chunk)
    log.Print("copied", r.index)
    r.index++
    return
}

func main() {
    client := &http.Client{
        Transport: &cronet.RoundTripper{},
    }
    chunk1 := []byte("YWFhYWFhYWFhYWFhYWE=\r\n")
    chunk2 := []byte("YWFhYWFhYWFhYWFhYWE=\r\n")
    chunkedReader := &ChunkedReader{
        chunks: [][]byte{chunk1, chunk2},
        delay:  3 * time.Second,
    }

    headers := map[string]string{
        "Host":           "127.0.0.1",
        "Content-Type":   "application/x-www-form-urlencoded",
        // get rid of Content-Length
    }

    req, err := http.NewRequest("POST", "http://localhost:1081", chunkedReader)
    req.Proto = "HTTP/1.1"
    req.ProtoMajor = 1
    req.ProtoMinor = 1
    if err != nil {
        log.Fatal(err)
    }
    for key, value := range headers {
        req.Header.Set(key, value)
    }

    log.Print("before client Do")
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()

    fmt.Println("Waiting for request to complete...")
    fmt.Printf("Response status: %s\n", resp.Status)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.