Giter Club home page Giter Club logo

Comments (12)

riobard avatar riobard commented on September 12, 2024

Sorry I didn't understand the problem. What happened here? And what's the step to reproduce it?

from go-shadowsocks2.

cute avatar cute commented on September 12, 2024

@riobard

go-shadowsocks2 client use socks5 proxy protocol, send address to server at first,
then send request header to server.
but my client use http proxy protocol, send address and request header to server.

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

Are you using go-shadowsocks2 as an HTTP proxy?

from go-shadowsocks2.

cute avatar cute commented on September 12, 2024

no, i write a shadowsocks client that provides http proxy.

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

Sorry I'm confused. Is this issue a bug report? What was wrong here?

from go-shadowsocks2.

arthurkiller avatar arthurkiller commented on September 12, 2024

@cute Maybe you'd better read the comments about the io.Copy()

// Copy copies from src to dst until either EOF is reached
// on src or an error occurs. It returns the number of bytes
// copied and the first error encountered while copying, if any.
//
// A successful Copy returns err == nil, not err == EOF.
// Because Copy is defined to read from src until EOF, it does
// not treat an EOF from Read as an error to be reported.
//
// If src implements the WriterTo interface,
// the copy is implemented by calling src.WriteTo(dst).
// Otherwise, if dst implements the ReaderFrom interface,
// the copy is implemented by calling dst.ReadFrom(src).

I think they can do same thing

from go-shadowsocks2.

cute avatar cute commented on September 12, 2024

@riobard
shadowsocks tcp protocol is [target address][payload], http request through local proxy:

local socks5 proxy send data to server:

write [target address]
write [payload]
read

local http proxy send data to server:

write [target address][payload]
read

If address and payload is sent together, server can not process the data correctly.

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

I think I understand the problem now. Do you have a code snippet to reproduce the bug?

from go-shadowsocks2.

cute avatar cute commented on September 12, 2024

@riobard what's your email? I want to send you an iOS app promotion code.

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

Got the code. What's the step to reproduce the bug?

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

Problem identified: this is actually caused by a bug in the implementation of AEAD stream reader. The fix has been committed into my fork here riobard@de996c8 and a new test release is created at https://github.com/riobard/go-shadowsocks2/releases/tag/v0.0.9

from go-shadowsocks2.

riobard avatar riobard commented on September 12, 2024

Fixed by #40

from go-shadowsocks2.

Related Issues (20)

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.