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.74k stars 111 forks source link

bug: can't connect to server after switch wifi #191

Closed linonetwo closed 1 year ago

linonetwo commented 2 years ago

This is because server will have different ip in different wifi.

Consider using localhost for local in-app-serving, and reverse proxy with token to allow scan QR code open in the phone. as in https://github.com/tiddly-gittly/TidGi-Desktop/projects/8#card-74037652

linonetwo commented 2 years ago

网络环境切换了就会这样,不管是断网还是切换网,我看看能不能搞个自动重启,这样就不用用户去操作了

linonetwo commented 2 years ago

或者弹框问用户要不要重启

linonetwo commented 2 years ago

说明现在数据是不会保存的

linonetwo commented 2 years ago

截屏2022-05-11 16 06 07

linonetwo commented 2 years ago

还是默认连 127.0.0.1 这样切换网络他也不会变化,只对有特殊需求的人开启外部访问

linonetwo commented 2 years ago

A user using TidGi also lost half an hour of his data (better than half a year...), because of that network connection error.

This is because TidGi starts a nodejs wiki, and listen on 0.0.0.0 ,and the browserview open the wiki on 192.168.xx.xx , and if you switch wifi, the 192.168.xx.xx will not be accessible, you have to access it from 10.xx.xx.xx

linonetwo commented 2 years ago

see also Jermolene/TiddlyWiki5#5952

e792a8 commented 2 years ago

本地浏览当然直接localhost啊,硬编码进去都没问题,还要搞到个局域网地址再连岂不是多此一举

linonetwo commented 2 years ago

这可不能想当然

linonetwo commented 2 years ago

@e792a8 通过配置来切换。你评论是打算来PR改吗

e792a8 commented 2 years ago

没有PR,今天刚从知乎找过来。我一看连的是个IP就猜到有这问题。等我有空研究下