1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-05 09:50:11 +00:00
Commit Graph

94 Commits

Author SHA1 Message Date
5702e8012c
proxy: use for updater & SMTP
imports a new package to create a HTTP proxy dialer for the SMTP client.
2023-10-05 12:32:25 +01:00
523902f951
proxy: add http/socks5 support, use for Jellyfin
can be found in advanced. Currently only used for the main Jellyfin
client.
2023-10-05 11:25:58 +01:00
f6fdd41b35
jellyfin: retry initial connection (configurable)
retries initial connection to Jellyfin 6 times, with a 10s gap between,
before failing. SHould help with issues of jfa-go starting before
Jellyfin.
Configurable in Settings > Advanced > "Initial auth retry count/gap".
2023-10-03 09:33:56 +01:00
e1292a0780
build: dont install swag if already present 2023-06-27 07:23:25 +01:00
b17d8424e9
profiles: fix application
moving to a DB meant empty slices in the Configuration & Policy structs
were being stored as null, and striking a nerve with Jellyfin.
Mediabrowser library change fixed that by de-nulling them itself, and a
new bool field called "Homescreen" is now used to decide if a profile
has a homescreen layout stored or not. This field is hopefully correctly
filled in during migration.
2023-06-26 13:01:17 +01:00
833be688ac
storage: start db migration (badger(hold))
migrating to badger, with the badgerhold frontend. So far, done:
* Announcements (small, for a quick test)
* Discord/Telegram/Matrix/Email

most interaction with badgerhold is done through the standard
Get<x>/Get<x>Key/Set<x>Key/Delete<x>Key. UserExists functions have been
added for email and matrix, and those and the original ones now use a
query against the database rather than sifting through every record.
I've tagged these searched fields as "index" for badgerhold, although this
definitely isn't used yet, and i'm not entirely sure if it'll be useful.

migrateToBadger is now in migrations.go, and a temporary config key
"migrated_to_badger" has been added, although it isn't being used yet,
migration is just running every time during development.
2023-06-24 17:05:04 +01:00
48403ce940
discord: proper support for discriminator-less
names with no discriminator are shown as @username, and search works
with the @ too. Also bumped go version to 1.20, since it was stuck on
1.16 and i felt like trying generics (in an ugly way).
2023-06-12 16:32:40 +01:00
73202e1483
crash: render ANSI colors on crash page
Could not for the life of me get any regex to properly strip the ANSI
escape sequences, so the text log will have to suffer with them, but the
ansihtml library is now used to render them into HTML.
2023-06-12 15:48:07 +01:00
2cb72e1f48
module update, add notice to site 2023-06-11 14:22:58 +01:00
0674e04ee1
go module update/tidy 2023-02-20 10:47:54 +00:00
4c3e310634
use go install for swag in goreleaser 2022-03-22 15:16:04 +00:00
12db53d1eb
reorganise api, add "Connection refused" error in setup
fixes #201
2022-03-22 14:58:39 +00:00
15e5564b12
discord: add/move to slash commands
the version of the discord library with support for this isn't
necessarily stable, so normal ! commands will still be available. The
user is no longer DMed for the PIN, instead they type /pin <PIN>.
2022-01-26 21:47:02 +00:00
e66241ddcb
fix crash page css when using goreleaser 2022-01-26 15:45:21 +00:00
be1d081629
build: fix css bundling bug with new esbuild
local testing was being done with an older version of esbuild which
didn't mind @tailwind statements before @imports (it complained, but did
its job). On the latest version used in Docker builds, it would leave
the @import statements intact which broke things like modals.
2022-01-26 14:26:10 +00:00
d9f8785372
form: add CAPTCHAs
Enabled in Settings > Captchas, shows a captcha on the account creation
form.
2022-01-10 01:55:48 +00:00
77c05a4d4f
prefix css with version to avoid cache conflict 2022-01-08 16:42:36 +00:00
9874dce520
merge tailwind and upgraded a17t
a17t v0.10 became a tailwind plugin rather than standalone css, and made
some other changes. Much of the original custom CSS now uses tailwind
classes, and there have been some other UI changes.
2022-01-04 20:28:36 +00:00
360c25d084
accounts: hide "Send PWR" when link resets disabled
for #182.
2021-12-24 19:05:48 +00:00
d47afe05f4
update deps, fix connection error log 2021-12-22 23:11:00 +00:00
9092f42834
remove vulnerable node deps, cleanup 2021-11-14 14:50:40 +00:00
f78fa28822
announcements: fix preview window 2021-11-10 20:04:04 +00:00
4d27f7fc7a
user mediabrowser 0.3.6 2021-10-13 15:22:06 +01:00
eeb9b07bce
admin: add manual "Send Password reset" to accounts tab
Only appears with Reset links enabled.
Pressing this sends a PWR link to the users selected.
if one user is selected, or if one of you selected users doesn't have a
method of contact, a link is given to the admin to send to them
manually.
2021-10-13 15:04:22 +01:00
d560df5b1e
switch smtp library, add, HELLO hostname option
now using xhit/go-simple-mail, as I wanted to add an option to change
the hostname sent in the HELLO message but this is only possible with
STARTTLS in jordan-wright/email. New option can be seen in Settings >
SMTP with advanced settings turned on.
2021-10-07 12:01:42 +01:00
756e7345cf
tray: remove systray dep in non-tray builds 2021-08-18 17:25:16 +01:00
eb3489b34f
tray: fix crashlogs, restart from web 2021-08-16 23:01:08 +01:00
1a6b0d2b6e
upgrade vulnerable deps
upgrade gin and switch dgrijalva/jwt-go to golang-jwt/jwt.
2021-07-27 10:08:01 +01:00
aa2891fc87
matrix: fix instant crash with e2ee
also some more attempts at fixing it, so far all i've found is that if
we don't delete the cryptoStore, the matrix client also gets the same
error we do if it send s a message to us (no session with given ID
found).
2021-07-20 15:34:39 +01:00
872c366384
go mod tidy 2021-07-16 15:51:27 +01:00
4c10996c09
matrix: ugly hack to fix encryption after restarts
with a persistent crypto.Store, element reports "** Unable to decrypt:
The secure channel with the sender was corrupted. **", and others
clients just fail. Deleting it before reinitialising the OlmMachine
stops this, although the first message to a user takes a while as i
guess it has re-establish a session (idk, this is above me).
2021-07-14 17:55:26 +01:00
833d02b032
matrix: end-to-end encryption by default
Existing chats will remain unencrypted but new ones will be.
2021-07-13 19:02:16 +01:00
30198fab87
matrix: switch to mautrix-go
hopefully this can be used to support end-to-end encryption.
2021-07-13 14:53:33 +01:00
6ca3ab899c
bump mb to 0.3.5 2021-06-26 15:23:39 +01:00
b538922c05
Show log on log.Fatal calls, provide "sanitized" version, fix goreleaser
Sanitization means change anything in double quotes to "CENSORED". A
notice is included telling the user to check for themselves as well.
2021-06-11 23:28:21 +01:00
f0f4e8118e
Generate crash report txt and webpage
The last 100 lines of logs are now cached, and when a crash occurs, they
are saved to a file in the temp directory ("/tmp" on *nix), and pretty
HTML version is also created and opened in the browser.
* Currently only handles panics, will be included in more places soon
* Copy button and button to generate a GH issue will be added
2021-06-11 21:56:53 +01:00
2f501697db
merge translations 2021-06-07 13:58:53 +01:00
0a71d5b216
PWR: Add option to set new password from magic link
For #103. Enable in Settings > Password Resets. Also changes the user's
ombi password.
2021-06-07 13:49:05 +01:00
Harvey Tindall
6fb8f1ed7f
Merge pull request #112 from hrfee/matrix
Matrix Integration
2021-05-31 21:12:57 +01:00
93c7a6e31b
apt: Change versioning to hopefully fix updates
0.0.0-{commit} didn't register as updates to the previously installed
  versions, but it looks like 0{commit} works.
2021-05-31 14:13:41 +01:00
e97b90d4d7
Matrix: Setup bot, add PIN verification
PIN is verified but not used currently. Works a little different than
the others, you input your matrix user ID and then the PIN is sent to
you. The bot doesn't support E2EE, so the bot being the first one to
message ensures the chat is unencrypted.
2021-05-29 17:43:11 +01:00
7035a3fe9c
Tray: Add button to open logs 2021-05-25 20:16:42 +01:00
62c29d55cc
Log output to TEMP/jfa-go.log when Tray enabled
-H=windowsgui completely disables Stdout/Stderr on Windows, so logging
is enabled.
2021-05-25 17:59:41 +01:00
85536ff79e
expand CONTRIBUTING, print if tray enabled on startup 2021-05-24 15:58:43 +01:00
d928df7ab2
Discord: Start bot, add !start and pin validity check
The bot should be created by the admin and added to a discord server
mutual to the intended new user(s). On !start in the server,
communication is moved to DMs. Currently !start works, and validity of a
given PIN is checked although nothing it done with this yet.
2021-05-17 23:42:33 +01:00
a62648ee68
fix cross compilation in goreleaser/drone
Necessary for go-autostart to work on windows. Tray will be enabled by
default for x86_64 windows/linux binaries.
2021-05-16 21:01:31 +01:00
5dee414596
add "autostart on login" option to tray 2021-05-16 17:40:03 +01:00
8cf9b1f905
add basic tray functionality
enable with `make TRAY=on ...`. Cross compilation apparently should work
from linux to linux & windows.
2021-05-16 16:23:28 +01:00
99875b9176
almost complete telegram user verification
When signing up, the user is given a pin code which they send to a
telegram bot. This provides user verification, but more importantly
allows the bot to message the user, as the Telegram API requires the
user to interact with the bot before it can do the opposite.

The bot should recognize the correct language, but a /lang command is
also provided to change it.

The verification process is pretty much functional but ui is still
broken, and it isn't properly integrated yet.
2021-05-07 01:08:12 +01:00
9944cc2db9
refactor; move logger to module 2021-05-01 00:13:57 +01:00