onionshare / onionshare Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Startup timer #572
Startup timer #572
Conversation
…cheduled share was canceled. Also, ensure subsequent shares can start
|
I've simplified the UI even more by removing the extraneous 'Start/stop the share at:' labels - instead the checkbox becomes the label, and the date/time setting becomes 'editable' if the checkbox is checked. I think this is a big improvement in preventing these options from cluttering the UI. (Remember that in the screenshot below, Start at/Stop at is only shown if the 'Schedule this share?' is checked, otherwise they are hidden entirely) Note also that the 'start time' gets set to a few minutes into the future, and can't be set older than the current time. If both the start and stop timers are set, then the default/proposed 'shutdown time' is set to be further in time than the start time, and can't be set earlier than the start time. Damn you Travis for failing for no reason to do with this branch! |
|
The clutter-free UI looks good. However the URL is apparently only visible to user after it's published. Regarding the dead man's switch, what I would like to have is the following: OnionShare pre-generates the ephemeral RSA key pair and derives the onion URL and slug in the background at start, or it fetches the persistent ones if setting for that is enabled. If I set timer for start, the URL/slug and "Copy URL" button would appear below the There's a problem however. If static URL is not checked, it's not possible to pre-fetch onion-URL using An example output of this will be This of course requires more work now that v3 Onion Services are on way but I hope this helps at least a bit. |
|
Hmm, I'm not sure how much refactoring of the backend would be necessary to achieve this. Currently the much easier method is to simply briefly start the share to obtain the URL, note it down somewhere, then stop the share and then configure the auto-start timer. Implementation of the above is probably beyond my skill set, I'll leave to @micahflee to think about, or feel free to fork my branch and implement this. |
|
The code above might look complicated but I want to point out that what's new is just the seven SLoC at the start of main(). The rest of the main is just explanation where to use the values, and proof that it works. The Tor class is just a compact representation of what OnionShare does. The backend would probably not require major changes, but small matter of programming usually isn't. I'll look into this when I find the time.
This is true but only in the case persistent URL is checked. If it's not, pressing it could be half the number of steps: |
|
Yep, to be clear, I agree with all those points, I just lack the skill to implement - especially when it will come to the IPC between GUI and backend and showing the URL/slug before start_onion_service() (which is called after the startup timer runs out) - just as one example. I mainly just fix small bugs and help triage support tickets in this project, I got myself too deep here. I'll leave my branch here in case it helps anyone else should they attempt to implement properly, cheers for your research and suggestions. |

I've implemented a startup timer (fixes #571) in a similar fashion to the shutdown timer.
This one delays the start of a share (at the point that we try to negotiate ADD_ONION in the controller) for the length of time specified.
I have modified the UI so that both timer options are hidden under a 'Schedule this share?' checkbox. This keeps the UI from getting too cluttered I think.
You can combine the startup and shutdown timers if you wish, or use them independently.
Since the user might change their mind about the scheduled start-up, I allow them to click the server button to 'cancel' the startup before it occurs.
After the start-up occurs, the share proceeds as normal
The CLI also works (--startup-timer 120 for example) - note that the time does get slightly skewed because the 'sleep' starts after the Tor connection itself is made, and the share starts after the ADD_ONION is negotiated, but it's not a big deal IMO.
The text was updated successfully, but these errors were encountered: