Skip to content

Instantly share code, notes, and snippets.

@ziozzang
Created February 17, 2019 23:59
Show Gist options
  • Select an option

  • Save ziozzang/706ff68eed050cbc628a05deb2d32c43 to your computer and use it in GitHub Desktop.

Select an option

Save ziozzang/706ff68eed050cbc628a05deb2d32c43 to your computer and use it in GitHub Desktop.
Korean SNI Censorship avoid Testing with https://github.com/ziozzang/SimpleSNIProxy

Notice

  • This code is over 4years. and works well in recent blocking issue. :)
  • This is for testing only. about techincal issue.
  • I masked URL from result. :)

TL;DR

  • Testing Result via Simple SNI Proxy Server by me.
  • This server is not intended to by-pass SNI censorship in korea. as you see, this code is 4 years old.

Testing

Why this works?

  • at code "main.go", line 191-194, each Write function send splited packet. so request packet is splited, the censorship device cannot detect fragmented one.

Test Case

  • Direct Connection to pxxxhub.com
root@asdf:~/SimpleSNIProxy# curl -v https://www.pxxxhub.com
* Rebuilt URL to: https://www.pxxxhub.com/
*   Trying 216.18.168.16...
* Connected to www.pxxxhub.com (216.18.168.16) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 592 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* gnutls_handshake() failed: Error in the pull function.
* Closing connection 0
curl: (35) gnutls_handshake() failed: Error in the pull function.
root@asdf:~/SimpleSNIProxy# docker build -t sniproxy .
root@asdf:~/SimpleSNIProxy# ocker run -d -p 80:80 -p 443:443 sniproxy
root@asdf:~/SimpleSNIProxy# docker ps -a
CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS                  PORTS                                               NAMES
c5a31538310e        sniproxy                              "/app/main"              19 minutes ago      Up 19 minutes           0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp            practical_lamarr
root@asdf:~/SimpleSNIProxy# curl --resolve www.pxxxhub.com:443:127.0.0.1 https://www.pxxxhub.com
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6 language-en" lang="en"> <![endif]-->
<!--[if IE 7 ]>	<html class="ie7 language-en" lang="en"> <![endif]-->
<!--[if IE 8 ]>	<html class="ie8 language-en" lang="en"> <![endif]-->
<!--[if IE 9 ]>	<html class="ie9 language-en" lang="en"> <![endif]-->
<!--[if !(IE)]><!--> <html class="language-en" lang="en"> <!--<![endif]-->

(deleted....)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment