mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 00:04:02 +03:00
Run gofumpt
This commit is contained in:
@@ -70,7 +70,8 @@ func (w *wrapperBlockCipher) RemoteAddr() *net.TCPAddr {
|
||||
}
|
||||
|
||||
func newBlockCipher(parent conntypes.StreamReadWriteCloser,
|
||||
encryptor, decryptor cipher.BlockMode) conntypes.StreamReadWriteCloser {
|
||||
encryptor, decryptor cipher.BlockMode,
|
||||
) conntypes.StreamReadWriteCloser {
|
||||
cipher := &wrapperBlockCipher{
|
||||
parent: parent,
|
||||
encryptor: encryptor,
|
||||
|
||||
@@ -91,7 +91,8 @@ func (w *wrapperConn) RemoteAddr() *net.TCPAddr {
|
||||
|
||||
func newConn(parent net.Conn,
|
||||
connID conntypes.ConnID,
|
||||
purpose connPurpose) conntypes.StreamReadWriteCloser {
|
||||
purpose connPurpose,
|
||||
) conntypes.StreamReadWriteCloser {
|
||||
localAddr := *parent.LocalAddr().(*net.TCPAddr)
|
||||
|
||||
if parent.RemoteAddr().(*net.TCPAddr).IP.To4() != nil {
|
||||
|
||||
@@ -84,7 +84,8 @@ func (w *wrapperCtx) RemoteAddr() *net.TCPAddr {
|
||||
|
||||
func NewCtx(ctx context.Context,
|
||||
cancel context.CancelFunc,
|
||||
parent conntypes.StreamReadWriteCloser) conntypes.StreamReadWriteCloser {
|
||||
parent conntypes.StreamReadWriteCloser,
|
||||
) conntypes.StreamReadWriteCloser {
|
||||
return &wrapperCtx{
|
||||
parent: parent,
|
||||
ctx: ctx,
|
||||
|
||||
@@ -26,7 +26,8 @@ var mtprotoEmptyIP = [4]byte{0x00, 0x00, 0x00, 0x00}
|
||||
func NewMiddleProxyCipher(parent conntypes.StreamReadWriteCloser,
|
||||
req *rpc.NonceRequest,
|
||||
resp *rpc.NonceResponse,
|
||||
secret []byte) conntypes.StreamReadWriteCloser {
|
||||
secret []byte,
|
||||
) conntypes.StreamReadWriteCloser {
|
||||
localAddr := parent.LocalAddr()
|
||||
remoteAddr := parent.RemoteAddr()
|
||||
|
||||
@@ -53,7 +54,8 @@ func mtprotoDeriveKeys(purpose mtprotoCipherPurpose,
|
||||
req *rpc.NonceRequest,
|
||||
resp *rpc.NonceResponse,
|
||||
client, remote *net.TCPAddr,
|
||||
secret []byte) ([]byte, []byte) {
|
||||
secret []byte,
|
||||
) ([]byte, []byte) {
|
||||
message := bytes.Buffer{}
|
||||
|
||||
message.Write(resp.Nonce)
|
||||
|
||||
@@ -84,7 +84,8 @@ func (w *wrapperObfuscated2) Close() error {
|
||||
}
|
||||
|
||||
func NewObfuscated2(socket conntypes.StreamReadWriteCloser,
|
||||
encryptor, decryptor cipher.Stream) conntypes.StreamReadWriteCloser {
|
||||
encryptor, decryptor cipher.Stream,
|
||||
) conntypes.StreamReadWriteCloser {
|
||||
return &wrapperObfuscated2{
|
||||
parent: socket,
|
||||
encryptor: encryptor,
|
||||
|
||||
Reference in New Issue
Block a user