tiddly-gittly / TidGi-Desktop

TidGi is an privacy-in-mind, automated, auto-git-backup, freely-deployed knowledge management Desktop note app, based on Tiddlywiki, with REST API for web-clipping and Anki connect. 「 太记 」是一个基于「 太微 TiddlyWiki 」的知识管理桌面应用,能保护隐私内容、高级自动化、自动Git云备份、部署为博客,且可通过RESTAPI与Anki等应用连接。(迭代开发中欢迎试用,开发进度见下方链接)(Under active development, see website below for details)
https://tidgi.fun
Mozilla Public License 2.0
1.71k stars 106 forks source link

feature: 支持https #387

Closed linonetwo closed 1 year ago

linonetwo commented 1 year ago

Description 描述

参考 http://wiki.onetwo.ren/startBlogAndProxy.config.js (目前无法https访问了)

module.exports = {
  apps : [
  {
    name: "tw",
    script: "tiddlywiki ~/wiki --listen host=0.0.0.0 port=8080 root-tiddler=$:/core/save/lazy-images tls-key=../ssl/wiki.onetwo.ren.key tls-cert=../ssl/wiki.onetwo.ren_public.crt",
        // pm2 watch is buggy, use crontab instead
    // watch: ['./wiki', wikiDir, '~/wiki'],
    // watch_delay: 1000,
  },
  {
    name: "git",
    script: "cd ~/wiki && git reset --hard origin/master && git pull --force",
  },
  {
     name: 'proxy',
     script: '~/cpolar tls -hostname=wiki.onetwo.ren -crt=~/ssl/wiki.onetwo.ren.pem -key=~/ssl/wiki.onetwo.ren.key -region=hk https://localhost:8080',
  }]
}

一般人应该用不上,只有部署博客的会用得上,应该和只读功能放一起折叠起来,搞一个「博客部署」功能合集,包括 https://github.com/tiddly-gittly/TidGi-Desktop/issues/384

  1. 打开https开关,展示两个上传按钮和文件路径和文件路径选择按钮
  2. 上传两个 key,放到 appdata 路径里保存起来
  3. 根据开关,在启动时带上
  4. 可能加载网页时也得用 https,不知道http的还能不能访问了

Additional Context 额外上下文

No response

linonetwo commented 1 year ago

59c6785d