packages feed

moesocks 1.0.0.30 → 1.0.0.40

raw patch · 5 files changed

+53/−15 lines, 5 files

Files

CHANGELOG.md view
@@ -1,11 +1,16 @@+1.0.0.40+---------+* Fix UDP packet size+* Clean up repository+ 1.0.0.30 ---------* Add `deny-list` option to specify an access control list file for blocking a+* Add a `deny-list` option to specify an access control list file for blocking a     large list of IPs.  1.0.0.20 ---------* Fix respect '--disable-socks5'+* Fix: respect `disable-socks5`  1.0.0.10 --------
README.md view
@@ -8,26 +8,53 @@ Installation ============ -* Need `GHC 7.10.2` on Unix.+Easy+---- -Usage-=====+### Install [Nix] -* Download a sample [config.json] to your current path+    curl https://nixos.org/nix/install | sh  -* Edit `config.json` to fit your setup (at least the `remoteHost` and `password`-  fields)+### Install moesocks +    nix-env -i -A nixpkgs.haskellPackages.moesocks++Hard+----++### Install GHC 7.10.2 and cabal-install+    +### Download moesocks++    git clone https://github.com/nfjinjing/moesocks++### Sandbox!++    cd moesocks+    cabal sandbox init++### Install++    cabal install++### Run++    .cabal-sandbox/bin/moesocks+++Usage+=====+ * Start a remote node outside a firewall: -        moesocks --role remote -c config.json+        moesocks -r remote -k birthday!  * Start a local node inside a firewall: -        moesocks --role local -c config.json+        moesocks -s $REMOTE_IP -k birthday!  * Now you have a SOCKS5 proxy running inside a firewall using port-  `localPort`.+  `1080`.  * SS compatible obfuscation can be turned on with the `-o` flag to make   statistical analysis on packet length a bit more confusing.@@ -69,7 +96,7 @@ TCP Fast Open (TFO) ==================== -## [TFO] means faster response in this case+## [TFO] is perfect for proxies.  Both local and remote will use TFO when instructed. If the browser in use and the website to visit both support TFO, you can enjoy TFO all the way through.@@ -125,6 +152,7 @@  [ss]:https://github.com/shadowsocks/shadowsocks [ss-haskell]:https://github.com/rnons/shadowsocks-haskell+[Nix]:https://nixos.org/nix/ [config.json]:https://raw.githubusercontent.com/nfjinjing/moesocks/master/config.json [#10590]:https://ghc.haskell.org/trac/ghc/ticket/10590 [TFO]:https://en.wikipedia.org/wiki/TCP_Fast_Open
moesocks.cabal view
@@ -1,6 +1,6 @@ name:               moesocks category:           Network-version:            1.0.0.30+version:            1.0.0.40 license:            Apache-2.0 synopsis:           A functional firewall killer description:        A SOCKS5 proxy using the client / server architecture.
src/Network/MoeSocks/Helper.hs view
@@ -260,6 +260,11 @@ recv_ :: Socket -> IO ByteString recv_ = flip recv 4096 +-- 65,507 bytes (65,535 − 8 byte UDP header − 20 byte IP header)+-- https://en.wikipedia.org/wiki/User_Datagram_Protocol+recv_UDP :: Socket -> IO ByteString+recv_UDP = flip recv 65507+ send_ :: Socket -> ByteString -> IO () send_ = sendAll 
src/Network/MoeSocks/UDP.hs view
@@ -92,7 +92,7 @@          send_ _remoteSocket - _encodeIV <> _eMsg -        _response <- recv_ _remoteSocket+        _response <- recv_UDP _remoteSocket          let (_decodeIV, _responseMsg) = S.splitAt (_cipherBox ^. ivLength)                                           _response@@ -141,7 +141,7 @@        send_ _targetSocket _decryptedMessage -      _r <- buildShadowSocksRequest _clientRequest <$> recv_ _targetSocket+      _r <- buildShadowSocksRequest _clientRequest <$> recv_UDP _targetSocket        {-debug_ - "R UDP <--: " <> show _r-}