跳到主要内容

文件共享

将客户端本地目录通过隧道暴露为 Web 文件门户。固定走 HTTPS,明文访问会自动跳转。

服务端配置​

# orbien-server.toml
server_addr = "0.0.0.0"
server_port = 9527
https_proxy_port = 8443

客户端配置​

# orbien.toml
[[proxies]]
name = "home-nas"
protocol = "file"
root_path = "/file/share"
custom_domains = ["nas.domain.com"]

[proxies.file_auth]
enabled = true
users = [
{ user = "guest", pass = "111", permission = "read" },
{ user = "admin", pass = "111", permission = "read_write" }
]

[proxies.file_limits]
max_upload_size = "5MB"
allow_upload = true
allow_delete = true
allow_mkdir = true
allow_move = true
allow_rename = true

浏览器访问:https://nas.domain.com:8443

提示

更多域名配置细节请移步 域名路由

参数说明​

参数名类型默认值描述必填
nameString代理名称是
protocolString协议类型是
root_pathString共享根目录绝对路径是
custom_domainsArray自定义域名列表否
sub_domainsArray子域名列表否
auto_domainBooleantrue未配置域名时是否自动生成否
enabledBooleantrue是否开启代理否

授权认证​

参数名类型默认值描述必填
enabledBooleantrue是否开启用户名密码认证否
usersArray认证用户列表否

用户信息​

参数名类型默认值描述必填
userString用户名是
passString密码是
permissionStringread_write权限:read / read_write否
说明

用户密码会被加密存储

访问限制​

参数名类型默认值描述必填
max_upload_sizeString500MB单文件上传大小上限,如 5MB否
allow_uploadBooleantrue是否允许上传否
allow_deleteBooleantrue是否允许删除否
allow_mkdirBooleantrue是否允许新建目录否
allow_moveBooleantrue是否允许移动否
allow_renameBooleantrue是否允许重命名否

TLS 证书​

可选。用于为该代理绑定独立证书;未配置时使用服务端默认证书。

参数名类型默认值描述必填
cert_fileString证书文件路径是
key_fileString私钥文件路径是