listener binds to a local host endpoint and listens for incoming connections.
For each incoming connection, socks5-server performs a SOCKS5 handshake and obtains a destination address from the SOCKS5 request, say google.com:443.
main-forward initiates a new connection with ss-client.
Since ss-client has encoded the destination address into the Shadowsocks protocol, proxy-redir will redirect the connection to the proxy address (my.proxy.server.com.:8388). Otherwise, encrypted Shadowsocks payload will be sent directly to google.com:443, which is not expected.
phy-socket resolves the IP address of my.proxy.server.com. using a system-resolver.
The Shadowsocks server at my.proxy.server.com.:8388 receives the request and starts relay between google.com:443 and your PC.