anchor.diff:                  gen_tcp:close(Back)
           end
       catch
  -        _:_ ->
  +        Error:Reason ->
  +            io:format("~p ~p ~p ~p.~n", [Client, Error, Reason, erlang:get_stacktrace()]),
               gen_tcp:close(Client)
  -    end.
  -
  -
  -start() ->
  -    spawn(?MODULE, back_start, []),
  -    spawn(?MODULE, front_start, []),
  -    receive
  -        {close} ->
  -            exit({done})
       end.
   
   socks5_handshake(Client) ->
  
positive.code: flip_send(Client, Data) ->
      gen_tcp:send(Client, flip(Data)).
  
  forward(flip_recv, Client, Remote, From) ->
      try
          {ok, Packet} = flip_recv(Client, 0),
          ok = gen_tcp:send(Remote, Packet)
      catch
          Error:Reason ->
              io:format("Client: ~p ~p ~p.~n", [Client, Error, Reason]),
              From ! {close},
              exit({Error, Reason})
      end,
      forward(flip_recv, Client, Remote, From);
  
  forward(flip_send, Client, Remote, From) ->
      try
          {ok, Packet} = gen_tcp:recv(Client, 0),
          ok = flip_send(Remote, Packet)
      catch
          Error:Reason ->
              io:format("Client: ~p ~p ~p.~n", [Client, Error, Reason]),
              From ! {close},
              exit({Error, Reason})
      end,
      forward(flip_send, Client, Remote, From).
  
  %% back，接受front的连接与认证，并接收加密的包解密后当作普通包处理。
  %% back -- remote，Raw
  %% remote -- back，Raw
  %% back -- front，Flip
  back_start() ->
      {ok, Socket} = gen_tcp:listen(?BACK_PORT, [{reuseaddr, true},
                                                 {active, false},
                                                 binary]),
      back_accept(Socket).
  
  back_accept(Socket) ->
      {ok, Client} = gen_tcp:accept(Socket),
  
negative.code:     try
          From = self(),
  
          {ok, <<?PASSWORD>>} = flip_recv(Front, ?PASSWORD_LENGTH, ?CONNECT_TIMEOUT),
  
          {ok, Remote} = socks5_handshake(Front),
          spawn(?MODULE, forward, [Front, Remote, From]),
          spawn(?MODULE, forward, [Remote, Front, From]),
  
          receive
              {close} ->
  