shadowsocks / go-shadowsocks2

Modern Shadowsocks in Go
Apache License 2.0
4.45k stars 1.39k forks source link

go-shadowsocks2 with http Request-Line encode on client. #175

Open ingnelson opened 4 years ago

ingnelson commented 4 years ago

@justlovediaodiao go-shadowsocks2 work fine, but i am looking a way to create a showsocks that can send a HTTP " Request-Line " with " GET " ; there is a ID (maybe it is the user and pass encode ) and then there must be a allowed websites by the firewall or allow domain by the firewall encode ( note: that domain or website it is not the server of the shadowsocks ) . So i think the server should understand those parameter .

Here is a packet data i captured , you can see it with WIRESHARK program on pc https://www.wireshark.org/download.html or online creating a free account on www.cloudshark.org/login Attatch file: quantumnica1.zip

example : GET #verx=2&0=c610d32167c94e46a48d959354202365&1=34c961c67ff3b923603867b1aecd506b&2=0&3=1&4=4&ope=1&cy=Claro-ni&7=dx1iv8o-nX8xY4AUPc9tWA==# HTTP/1.1

As you can see in this screenshot: Shadowsocks with http request encode

justlovediaodiao commented 4 years ago

You mean a http or https proxy. It runs on client or server side?

If on client side, the request is like this:

app ----> local http(s) proxy ----> remote shadowsocks server ----> target

go-shadowsocks2 need to strart a http(s) proxy server on client, and send requests to remote shadowsocks server. Currently go-shadowsocks2 only supports socks5 proxy.

If on server side, the request is like this:

app ----> remote http(s) proxy ----> target

A http(s) proxy tool is required. It has nothing to do with shadownsocks.

ingnelson commented 4 years ago

@justlovediaodiao of course it have something with shadowsocks because somebody create that method of communication and he created a app to send the request encoded and then connect via local Host (127.0.0.1) to shadowsocks. You like a person that know more about shadowsocks , can you tell how to do it ? Look : 806527796_30481 Screenshot_2020-05-12-12-16-20-769_com github shadowsocks IMG_20200501_212110 IMG_20200429_101602

As you can see he send a http request encode like :

GET #verx=2&0=c610d32167c94e46a48d959354202365&1=34c961c67ff3b923603867b1aecd506b&2=0&3=1&4=4&ope=1&cy=Claro-ni&7=dx1iv8o-nX8xY4AUPc9tWA==# HTTP/1.1

Can you create something similar ? Please . Because it is the only way in America to bypass our ISP and I do not know how to do it.

I will wait your answer.

justlovediaodiao commented 4 years ago

What's the App? This is an encoded request, not standard http request. First we need to know how to decode the request.

ingnelson commented 4 years ago

@justlovediaodiao it is app a guy my from country created and sell every account for $15 for 1 month to get internet free. He sell it on 8 countries to get internet free. One question : Could be possible that inside the first app that send the request there are a proxy inside like a python or nginx proxy and the shadowsocks server and port of shadowsocks too ?

Or just the shadowsocks server inside the first app ?

justlovediaodiao commented 4 years ago

I don't understand how the app you bought works and what does it have to do with shadowsocks. How do you want the request to be delivered between the proxy and the server?

ingnelson commented 4 years ago

@justlovediaodiao it is posible to combine a " proxy + shadowsocks "
Example : gettunel video

The proxy (gettunel port 80 ) send the request (hostname or allowed website and password ) and shadowsocks on port 443 created the tunnel. Look the packet data :

GETTUNEL packet

as you see in the first app (gettunel) has the proxy and the shadowsocks server and gettunel connect to shadowsocks app via localhost (127.0.0.1 port 4242 )

Here are the apk you if want to try: GETTUNEL-ANDROID.zip

Here is a gettunel server if you want to install it on use VPS . but on the file above a send you my server . Gettunel (python server) client and server for linux client : https://github.com/balangandio/get-tunnel-py

This is just a single server file for VPS: https://github.com/ingnelson/ADM-MANAGER-MOD/blob/master/Modulo/get

As you can see it is posible to use a proxy + shadowsocks. can you create a proxy that send that type of encode request . I think it is a proxy that send a fragmented request.

i will wait your answer.

justlovediaodiao commented 4 years ago

I've read the pyton GetTunnel source code. Now I unstanderd how it works. The shadowsocks app works in VPN mode and all traffics go through it. It sends traffics to 127.0.0.1:4242. The GetTunnel app listens on 127.0.0.1:4242. it sends traffics to 172.245.22.211:80. The GetTunnel server listens on 172.245.22.211:80, it send traffics to 172.245.22.211:443. The shadowsocks server listens on 172.245.22.211:443.

 traffics ---> VPN (shadowsocks app) ----> 127.0.0.1:4242 (GetTunnel app) ----> 172.245.22.211:80 (GetTunnel server) ----> 172.245.22.211:443 (Shadowsocks server)

The GetTunnel acts as a tunnel, it is optional. Where does the encoded request come from?

GET #verx=2&0=c610d32167c94e46a48d959354202365&1=34c961c67ff3b923603867b1aecd506b&2=0&3=1&4=4&ope=1&cy=Claro-ni&7=dx1iv8o-nX8xY4AUPc9tWA==# HTTP/1.1
ingnelson commented 4 years ago

@justlovediaodiao GET #verx=2&0=c610d32167c94e46a48d959354202365&1=34c961c67ff3b923603867b1aecd506b&2=0&3=1&4=4&ope=1&cy=Claro-ni&7=dx1iv8o-nX8xY4AUPc9tWA==# HTTP/1.1

It is the request from the app the guy sell . He doesn't use Gettunel proxy , because like you see it is a fragmented or encode request , but you can see he use it the same way like Gettunel app but instead Gettunel proxy he use encode or fragment proxy.

You are the only one who understands how this method works and you have the knowledge to create a proxy and try it with shadowsocks .

All I want you to know, he use a proxy and shadowsocks in the first app, so like you said he use : traffics ---> VPN (shadowsocks app) ----> 127.0.0.1:4242 (app with encode request) ----> 172.245.22.211:80 ( server proxy understand encode) ----> 172.245.22.211:443 (Shadowsocks server)

But instead "Gettunel proxy" he use his own "fragment proxy " or "encode proxy".

On GitHub there are proxy for encode request I think , but I am not a programmer and I do not know how to try it. Example: https://github.com/zahraDehghanian97/Encoder-multi-thread-proxy

So now you know how it works the method , can you create a proxy encode similar like that ? Please .

I will wait your answer.

justlovediaodiao commented 4 years ago

I need to know how the app you bought encodes requests. I can develop cross platform server and client running in command line. I cannot develop an Android app.

ingnelson commented 4 years ago

@justlovediaodiao Can you create the proxy with encode or fragment request and try it with shadowsocks as VPN on PC or laptop ?

justlovediaodiao commented 4 years ago

Without knowing the encoding method, I cannot do anything.

clearcodecn commented 3 years ago

@justlovediaodiao I think if the project can support local http(s) to shadowsocks will be a better choice.

app ----> local http(s) proxy ----> remote shadowsocks server ----> target

you know, we have some tools like polipo, privoxy can help us convert socks ---> http, but we need more config for them. if we need a command request like: curl https://www.google.com, we want to set our proxy on command line, but many http clients don't support socks5 protocol.

so if anyone can create a tool all-in-one will be better.

BigSully commented 2 years ago

Here is one implementation of http proxy, compile it yourself if you cannot wait.