feat: 支持局域网 HTTPS 直连并持久化插件连接配置
This commit is contained in:
1 parent
9eba4556db
commit
2203afde3c
15 files changed
+486
-17
No files matched your search
@@ -77,7 +77,7 @@ class RemotePanel(private val project: Project) : JPanel(BorderLayout()), Dispos
|
||||
@Volatile private var cancelRequested = false
|
||||
@Volatile private var busy = false
|
||||
private val gson = Gson()
|
||||
private val http = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(15)).build()
|
||||
private var http = ServerTls.client("")
|
||||
private val polling = AppExecutorUtil.getAppScheduledExecutorService().scheduleWithFixedDelay({ refreshDevices() }, 1, 5, TimeUnit.SECONDS)
|
||||
init {
|
||||
val configure = JButton("连接设置")
|
||||
@@ -170,6 +170,7 @@ class RemotePanel(private val project: Project) : JPanel(BorderLayout()), Dispos
|
||||
override fun run(indicator: ProgressIndicator) {
|
||||
var secret = ""
|
||||
try {
|
||||
http = ServerTls.client(cfg.serverCertificate)
|
||||
secret = PasswordSafe.instance.getPassword(credentials(base)) ?: ""
|
||||
check(secret.length >= 24) { "请在右侧 Remote Configuration 中保存服务 Token" }
|
||||
if (cfg.install) {
|
||||
|
||||
Reference in new issue
Block a user