xinetd 代理 SMTP 和 IMAP

通过 xinetd 代理 SMTP 和 IMAP 实现 gmail 翻墙。

  1. 配置服务端

    service imap
    {
    		type = UNLISTED
    		port = 993
    		bind = 0.0.0.0
    		socket_type = stream
    		wait = no
    		user = nobody
    		redirect = imap.gmail.com 993
    		per_source = UNLIMITED
    		cps = 100 2
    }
    service smtp-465
    {
    		type = UNLISTED
    		port = 465
    		bind = 0.0.0.0
    		socket_type = stream
    		wait = no
    		user = nobody
    		redirect = smtp.gmail.com 465
    		per_source = UNLIMITED
    		cps = 100 2
    }
    service smtp-587
    {
    		type = UNLISTED
    		port = 587
    		bind = 0.0.0.0
    		socket_type = stream
    		wait = no
    		user = nobody
    		redirect = smtp.gmail.com 587
    		per_source = UNLIMITED
    		cps = 100 2
    }
    
  2. 本机修改 hosts

    echo '45.115.36.35 smtp.gmail.com' | sudo tee -a /etc/hosts
    echo '45.115.36.35 imap.gmail.com' | sudo tee -a /etc/hosts
    

通过滴滴云穿透和加速 gmail 代理

  1. 通过在滴滴云上配置

    service imap
    {
    		type = UNLISTED
    		port = 993
    		bind = 0.0.0.0
    		socket_type = stream
    		wait = no
    		user = nobody
    		redirect = 45.115.36.35 993
    		per_source = UNLIMITED
    		cps = 100 2
    }
    service smtp-465
    {
    		type = UNLISTED
    		port = 465
    		bind = 0.0.0.0
    		socket_type = stream
    		wait = no
    		user = nobody
    		redirect = 45.115.36.35 465
    		per_source = UNLIMITED
    		cps = 100 2
    }
    service smtp-587
    {
    		type = UNLISTED
    		port = 587
    		bind = 0.0.0.0
    		socket_type = stream
    		wait = no
    		user = nobody
    		redirect = 45.115.36.35 587
    		per_source = UNLIMITED
    		cps = 100 2
    }
    
  2. 调整本地 hosts

    echo '117.51.146.119 smtp.gmail.com' | sudo tee -a /etc/hosts
    echo '117.51.146.119 imap.gmail.com' | sudo tee -a /etc/hosts