ssh 使用代理

Others 2021-03-18 09:18:08 2021-03-18 09:18:08 4 次浏览
function proxy_on(){
            export ALL_PROXY=socks5://127.0.0.1:10808
                export http_proxy=127.0.0.1:10809
                    export https_proxy=127.0.0.1:10809
                        echo -e "已开启代理"
                }
                # 关闭代理
                function proxy_off(){
                            unset ALL_PROXY
                                unset http_proxy
                                    unset https_proxy
                                        echo -e "已关闭代理"
                                }
                                # 执行proxy_off,默认关闭,也可以默认开启

proxy_on