mirror of
https://github.com/kepler155c/opus
synced 2026-04-28 09:31:25 +00:00
network group wip + virtual dirs + better trust
This commit is contained in:
@@ -6,6 +6,7 @@ local Util = require('util')
|
||||
local colors = _G.colors
|
||||
local multishell = _ENV.multishell
|
||||
local os = _G.os
|
||||
local shell = _ENV.shell
|
||||
local term = _G.term
|
||||
|
||||
local remoteId
|
||||
@@ -26,7 +27,15 @@ if multishell then
|
||||
end
|
||||
|
||||
local function connect()
|
||||
local socket, msg = Socket.connect(remoteId, 5900)
|
||||
local socket, msg, reason = Socket.connect(remoteId, 5900)
|
||||
|
||||
if reason == 'NOTRUST' then
|
||||
local s, m = shell.run('trust ' .. remoteId)
|
||||
if not s then
|
||||
return s, m
|
||||
end
|
||||
socket, msg = Socket.connect(remoteId, 5900)
|
||||
end
|
||||
|
||||
if not socket then
|
||||
return false, msg
|
||||
|
||||
Reference in New Issue
Block a user