Giter Site home page Giter Site logo

h2c-golang-example's Issues

Help, HTTP over TCP tunnel

Hello @thrawn01

I am from America, is it possible with your knowledge create a HTTP over TCP tunnel to bypass my isp provider , but any data the client need to transfer to the server should be via a new HTTP request ( encode64 ) then server decode the data ?
because my ISP provider blocks the upstream data via HTTP BODY.

It is difficul for me and i can not do it.
i did all the test to check the isp restrictions.

my telegram is : @Trader_Nelson

i will wait your reply.

No concurrent request handling

Using your code, if I make a handler like:

func handler(w http.ResponseWriter, r *http.Request) {
	time.Sleep(time.Second * 5)
	fmt.Fprintf(w, "This request is served over h2c!")
}

and make two requests at the same time, one returns in 5 seconds, the other one returns in 10 seconds.

I think you need a go statement like go server.ServeConn in the example code.

when doing post to the h2c server: response.Write on hijacked connection

if you try to post against the server:

curl --http2 -d foo localhost:1010

you get

Listening [0.0.0.0:1010]...
2021/01/08 19:45:45 http: response.Write on hijacked connection from fmt.Fprintf (print.go:205)

(and no reply)

ps: curl --http2-prior-knowledge -d foo localhost:1010 does work, it's only when upgrading that something happens to the response writer... I think it's because the body is supposed to become bi directional but I haven't figured that out yet

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.