Comments (9)
How about monitoring .config/syncthing/ for changes to .idx.gz files? (or monitoring that directory for any changes at all)
from syncthing-android.
I was just about to edit something like that in :P
I'm not sure what those files do, but I assume they are not directly tied to the web interface (rather to syncing, so when pause is added, this might break).
from syncthing-android.
So, the index files are a cache of the state of the local repository: file metadata and hashes. When syncthing starts up it reads the indexes and compares the local repository to them. Files that have changed are rehashed, files that are no longer there are marked as deleted, etc.
When syncthing is up and running it will periodically save a new index, if there have been any changes (i.e. changes detected locally, or we synced something).
I actually think polling the GUI port until it responds is the cleanest way, or just reading stdout from syncthing and looking for the pattern "Starting web GUI on "...
Or a new log line could be added before https://github.com/calmh/syncthing/blob/master/cmd/syncthing/main.go#L274 if you want to be really sure that the webserver is listening, not just that it will be in a few clock cycles. Practically, I think you will need to be very fast indeed to notice the difference.
from syncthing-android.
Okay so index files aren't the way to go for this.
I only read the syncthing output on shutdown right now, so I can't do that (and it doesn't feel good).
So I'll just poll the port (but without a full-blown browser running).
from syncthing-android.
(/rest/version
should be the most lightweight URL to poll repeatedly and the response is something you can know if it's correct, but really anything should work)
from syncthing-android.
I just do a Head request and check for http status 200. I also stop polling after the first successful try.
from syncthing-android.
I don't know if this should be considered related or a distinct issue, but when the web UI port is manually changed and the server is reset (all through the integrated web UI), the UI is not found in the web view. Exiting the application at this point does not appear to close down the server either. I was able to view the UI using an external browser, but this may have been due to the browser cache storing old information.
from syncthing-android.
The address is read from the config.xml on start. It should work if you restart the app (menu->exit and then open it again). I just noticed that you'll get the same problem if you change the API key and do a restart through the web GUI.
Feel free to make that a new issue, I'll have to think about how to avoid those problems properly.
from syncthing-android.
I just noticed this is a problem that I will have to fix with #5. (Config changes show a notification starting from 0.4.0, and we use that to update the repos, nodes, gui address, and api key).
from syncthing-android.
Related Issues (20)
- Web UI loads incorrectly HOT 10
- Can't change number of connection above 1. HOT 5
- Device appears to be disconnected from other devices, but reconnects when the app is open HOT 1
- Web interface not loading / cookie problem HOT 21
- Web interface fails to load after upgrade to 1.26.0 HOT 3
- Syncthing Suddenly Crashes with exit code 2 HOT 10
- web UI not showing folders HOT 1
- Web GUI is broke after last update HOT 1
- Android 13 saf file path support HOT 1
- Broken Bountysource link in README HOT 1
- App keeps crashing after setting fswatcher delay to 0.1 sec HOT 8
- Installing APK fails with 'java.lang.RuntimeException: Could not copy bitmap to parcel blob' HOT 22
- Could not access device ID + Disconnection
- Syncthing loading forever (Android 5.0) HOT 33
- FileUriExposedException on editing ignores HOT 2
- Typo error in welcome screen
- App not working despite phone is connected to wifi HOT 1
- Expecting binder but got null! HOT 2
- Syncthing stops running after a few weeks HOT 4
- Support for Android SAF HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from syncthing-android.