rboot

command module
v0.0.0-...-0aec128 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2022 License: MIT Imports: 18 Imported by: 0

README

配置rboot机器人

文档

ssh + nginx 内网穿透

在可以访问外网的服务器安装 Nginx

  1. 创建 nginx 配置文件 88 为外网访问地址 8888 用来转发 88 端口的内容

    upstream _proxy {
            server 127.0.0.1:8888;
    }
    
    server {
            listen 88; 
            server_name localhost;
            location / {
                    proxy_pass http://_proxy/;
            }
    }
    
  2. 加载配置文件

在内网上建立 ssh 反向隧道/远程转发

即把服务器请求转发到本地

ssh -fCNR [B机器IP或省略]:[B机器端口]:[A机器的IP]:[A机器的sshd端口] [登录B机器的用户名@B机器的IP] -p [B机器的sshd端口]

内网机器的服务端口是8080,反向代理到外网机器的8999端口,在内网机器上操作:

ssh -fCNR 8999:localhost:8080 -o ServerAliveInterval=60 root@123.123.123.123 -p 22

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL