Compare commits

...

217 Commits

Author SHA1 Message Date
e8c56bb3bc Merge pull request 'Updated links for Xivapi sources' (#54) from xivapi-link-changes into master
Reviewed-on: #54
2026-01-05 12:03:09 +00:00
8e0dcc6792 Updated links for Xivapi sources 2026-01-05 12:01:53 +00:00
ac4174f6e0 Fix moderator status on broadcast (#51)
Co-authored-by: cake <admin@cakeandbanana.nl>
Reviewed-on: #51
Co-authored-by: cake <cake@noreply.git.lightless-sync.org>
Co-committed-by: cake <cake@noreply.git.lightless-sync.org>
2026-01-04 05:14:37 +00:00
9fffaf7df2 fix-prune (#50)
Co-authored-by: Tsubasahane <wozaiha@gmail.com>
Co-authored-by: cake <admin@cakeandbanana.nl>
Reviewed-on: #50
Co-authored-by: cake <cake@noreply.git.lightless-sync.org>
Co-committed-by: cake <cake@noreply.git.lightless-sync.org>
2026-01-04 05:14:22 +00:00
ca0c548373 AddBan changes for ban admin panel rework (#52)
Co-authored-by: cake <admin@cakeandbanana.nl>
Reviewed-on: #52
Co-authored-by: cake <cake@noreply.git.lightless-sync.org>
Co-committed-by: cake <cake@noreply.git.lightless-sync.org>
2026-01-04 05:12:00 +00:00
1716750347 Location Sharing (#49)
Authored-by: Tsubasahane <wozaiha@gmail.com>
Reviewed-on: #49
Co-authored-by: Tsubasa <tsubasa@noreply.git.lightless-sync.org>
Co-committed-by: Tsubasa <tsubasa@noreply.git.lightless-sync.org>
2025-12-31 17:32:00 +00:00
d39a922482 Merge pull request 'Trying a different method of setting access time.' (#48) from cache-test-fix into master
Reviewed-on: #48
2025-12-23 17:14:08 +00:00
6216664e18 Merge branch 'master' into cache-test-fix 2025-12-23 17:12:45 +00:00
54992234d5 Merge pull request 'disable-chat-groups' (#45) from disable-chat-groups into master
Reviewed-on: #45
2025-12-23 16:55:33 +00:00
90e81fb955 Merge branch 'master' into disable-chat-groups 2025-12-23 16:55:21 +00:00
defnotken
4012b33f98 Trying a different method of setting access time. 2025-12-23 10:36:38 -06:00
33fb6ba2eb Merge pull request 'Done same for user' (#47) from fix-profile-hide into master
Reviewed-on: #47
2025-12-22 20:31:36 +00:00
cake
d1526fa49e Done same for user 2025-12-22 21:20:32 +01:00
5b5f8edc3b Merge pull request 'Removed code that would prevent changes on disabled profile.' (#46) from fix-profile-hide into master
Reviewed-on: #46
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-12-22 14:53:52 +00:00
cake
8515364ffd Removed code that would prevent changes on disabled profile. 2025-12-22 15:46:52 +01:00
defnotken
4ec6169ebd fix context 2025-12-21 21:02:59 -06:00
defnotken
ec26abaeb5 Revert "Merge pull request 'revert ce9b94a534c1239b4b89c4ccf05354c477da49d9' (#44) from defnotken-patch-1 into master"
This reverts commit 76bdbe28da, reversing
changes made to ce9b94a534.
2025-12-21 21:00:53 -06:00
3350f2ebf6 Merge branch 'master' into disable-chat-groups 2025-12-22 02:57:55 +00:00
defnotken
670e0e01f1 Merge branch 'disable-chat-groups' of https://git.lightless-sync.org/Lightless-Sync/LightlessServer into disable-chat-groups 2025-12-21 20:48:22 -06:00
defnotken
12d51dc689 Generate migration 2025-12-21 20:48:07 -06:00
defnotken
860bc955a4 Generate migration 2025-12-21 20:43:24 -06:00
76bdbe28da Merge pull request 'revert ce9b94a534c1239b4b89c4ccf05354c477da49d9' (#44) from defnotken-patch-1 into master
Reviewed-on: #44
2025-12-22 02:27:14 +00:00
f4753505aa revert ce9b94a534
revert Merge pull request 'add capability to disable chat feature for groups/syncshells' (#43) from disable-chat-groups into master

Reviewed-on: #43
2025-12-22 02:25:40 +00:00
ce9b94a534 Merge pull request 'add capability to disable chat feature for groups/syncshells' (#43) from disable-chat-groups into master
Reviewed-on: #43
2025-12-22 02:18:00 +00:00
Abelfreyja
e58210e770 add capability to disable chat feature for groups/syncshells 2025-12-22 10:24:34 +09:00
6d49389bd4 Merge pull request 'bump-api' (#42) from bump-api into master
Reviewed-on: #42
2025-12-19 15:38:53 +00:00
defnotken
9a964b4933 Merge branch 'bump-api' of https://git.lightless-sync.org/Lightless-Sync/LightlessServer into bump-api 2025-12-19 09:37:49 -06:00
defnotken
2ca0fe0697 bumping tha api 2025-12-19 09:37:15 -06:00
10bcf5dd1f Merge pull request 'migration-fix' (#41) from migration-fix into master
Reviewed-on: #41
2025-12-19 12:04:12 +00:00
defnotken
dda22594f1 db migration add for chat changes 2025-12-19 05:52:52 -06:00
defnotken
802077371b fixed db migration for chat 2025-12-19 05:52:00 -06:00
6321f385da Discord-bot + server updates (#39)
Co-authored-by: defnotken <itsdefnotken@gmail.com>
Reviewed-on: #39
Co-authored-by: defnotken <defnotken@noreply.git.lightless-sync.org>
Co-committed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-12-19 10:38:51 +00:00
cake
7cd463d4b7 bump api server 2025-12-19 07:12:09 +01:00
dda45e8e73 Merge pull request 'Chat adjustment for release' (#38) from chat-adjustments into master
Reviewed-on: #38
2025-12-18 21:19:55 +00:00
cake
7f01cc3661 bump api 2025-12-18 22:19:19 +01:00
azyges
67fe2a1f0f just chat improvements :sludge: 2025-12-17 03:46:23 +09:00
azyges
1734f0e32f Merge branch 'master' of https://git.lightless-sync.org/Lightless-Sync/LightlessServer into chat-adjustments 2025-12-17 00:14:40 +09:00
2fb41d0b9f Merge pull request 'Reduced content length of message, commented out the pending report.' (#37) from chat-changes into master
Reviewed-on: #37
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-12-16 12:00:08 +00:00
cake
6294b1d496 Reduced report chat messages to 1 min of polling 2025-12-16 07:11:35 +01:00
cake
143037165a Reduced amount of chats, commented out the pending report. 2025-12-16 07:06:17 +01:00
azyges
989d079601 chat zone config, add more default zones 2025-12-14 15:55:32 +09:00
azyges
03ba9493fc prevent report dodging by leaving channel, allow reports to work after leaving the channel too 2025-12-14 15:13:22 +09:00
c731b265ff Merge pull request 'Auto pruning of Syncshell, Added group count in DTO of group. Changed database to add prune days. Metrics added for auto prune enabled syncshells.' (#36) from auto-prune-syncshell into master
Reviewed-on: #36
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-12-09 05:37:42 +01:00
cake
5feb91ed42 updated api 2025-12-09 05:32:32 +01:00
cake
918c5e7d5d Added disabled in the group profile dto. 2025-12-07 21:53:01 +01:00
cake
7748fa6eac Back to an hourly action 2025-12-07 02:21:48 +01:00
cake
16c55d634d Set minutes to 1 for testing. 2025-12-07 02:18:34 +01:00
cake
7c66d4c9cf Update lightless api 2025-12-06 23:39:31 +01:00
cake
e21f9c36a4 Revert DTO, Changed messagepackprotocol again. 2025-12-06 23:39:24 +01:00
cake
c9d3cb0d50 Updated submodule 2025-12-06 22:58:36 +01:00
cake
2dc7681904 Changed resolver a bit for messagepack 2025-12-06 21:47:57 +01:00
cake
fb6ff4fb0e Update 2025-12-06 20:16:09 +01:00
cake
903429e148 Merge branch 'auto-prune-syncshell' of https://git.lightless-sync.org/Lightless-Sync/LightlessServer into auto-prune-syncshell 2025-12-06 18:29:59 +01:00
cake
d7e5117e6b Update 2025-12-06 18:02:45 +01:00
cake
727f27c2d1 Fixed some problems. 2025-12-06 18:02:39 +01:00
3218e800d6 Merge branch 'master' into auto-prune-syncshell 2025-12-06 03:16:40 +01:00
cake
7e7a5808f4 Update submodule. 2025-12-05 22:01:58 +01:00
cake
091bfbbc29 Auto-pruning of syncshell, added metrics for pruning, return of count of users in fullgroupdto. 2025-12-05 22:01:48 +01:00
00bcbbf8f4 Western Canadians will now filter to NA-East where servers are located in Canada.
Co-authored-by: defnotken <itsdefnotken@gmail.com>
Reviewed-on: #35
2025-11-20 19:33:53 +01:00
63211b2e8b Merge pull request 'Fix Fk' (#34) from fkfix into master
Reviewed-on: #34
2025-11-17 18:34:18 +01:00
defnotken
a1280d58bf Fix Fk 2025-11-17 09:34:33 -06:00
34f0223a85 revert revert regex 2025-11-13 15:50:19 +01:00
69f06f5868 Merge pull request 'revert regex' (#33) from revert-regex into master
Reviewed-on: #33
2025-11-13 15:22:20 +01:00
066f56e5a2 Merge branch 'master' into revert-regex 2025-11-13 15:22:05 +01:00
defnotken
287f72b6ad revert regex 2025-11-13 08:21:37 -06:00
ef13566b7a Merge pull request 'Fix chat stuff' (#32) from chat into master
Reviewed-on: #32
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-11-12 01:53:11 +01:00
084b4711b0 Merge branch 'master' into chat 2025-11-12 00:36:29 +01:00
azyges
9d496ee8e9 fix server message oops 2025-11-12 07:22:16 +09:00
azyges
0632c24a08 Merge branch 'chat' of https://git.lightless-sync.org/Lightless-Sync/LightlessServer into chat 2025-11-12 04:40:03 +09:00
azyges
8821f1d450 adjustments and add rate limit 2025-11-12 04:39:32 +09:00
3b0e80f92b Merge pull request 'Updated Lodestone URL regex' (#30) from lodestone-auth-regex-adjust into master
Reviewed-on: #30
2025-11-11 19:11:43 +01:00
586b5d0dd5 Chat Support for Server.
Reviewed-on: #31
2025-11-11 19:09:28 +01:00
defnotken
6858431c2d Merge branch 'master' into chat 2025-11-11 12:05:59 -06:00
cake
50c9268e76 updated submodule 2025-11-11 18:59:50 +01:00
625caa1e6a Refactor Discord Bot to make sense..
Reviewed-on: #29
2025-11-11 18:48:58 +01:00
defnotken
10cb6e9c2c update reference 2025-11-11 11:47:44 -06:00
defnotken
72b5b21624 Working User Info Changes. 2025-11-11 11:29:09 -06:00
defnotken
ac37020429 Lets try banners 2025-11-11 11:16:12 -06:00
defnotken
3b93ebb9e5 more logging 2025-11-11 11:04:39 -06:00
defnotken
44dc35ff99 logging image 2025-11-11 10:59:02 -06:00
defnotken
fac5b3caef Log warning 2025-11-11 10:54:24 -06:00
defnotken
f4ac99ba05 reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 2025-11-11 10:50:54 -06:00
defnotken
a63742df83 Lets try this again 2025-11-11 10:44:57 -06:00
defnotken
47fec97e81 Testing user info part 2 2025-11-11 10:29:54 -06:00
defnotken
32a9e93217 Testing profile in userinfo 2025-11-11 09:53:59 -06:00
azyges
cf5135f598 add generated world, territory registries and serverside verification for only legit territories and worlds defined by server 2025-11-08 07:38:35 +09:00
azyges
7cfe29e511 clean up structs and seperate zone definitions 2025-11-05 01:40:48 +09:00
0f95f26c1c Implemented match group instead of tinkering with the URL string
We're using regex already anyways, so might as well take advantage of matching groups. Group 1 will always be the country code and group 2 always the ID
2025-11-01 22:47:05 +01:00
8e36b062fd Updated Lodestone URL regex
Made it match the lodestone URL scheme exactly, with optional trailing "/" and nothing before or after the URL
2025-11-01 22:29:09 +01:00
defnotken
47b2a7a9b9 boolz 2025-10-29 18:26:41 -05:00
defnotken
7520bc1fa0 nullable 2025-10-29 18:09:06 -05:00
defnotken
700428eccb I'm blind 2025-10-29 17:56:09 -05:00
defnotken
9f97ab1eb4 Fixing some group controller stuff 2025-10-29 17:26:43 -05:00
defnotken
de0a37985a Update API 2025-10-29 17:23:32 -05:00
defnotken
1db5b7056d Initial Bot Cleanup + Profile Toggling 2025-10-29 17:23:07 -05:00
azyges
96627e3b85 bump submodule 2025-10-29 07:55:39 +09:00
azyges
dceaceb941 chat 2025-10-29 07:50:41 +09:00
ee69df8081 Merge pull request 'Fixed some issues on group/user profiles' (#25) from syncshells-images-combined into master
Reviewed-on: #25
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-10-27 20:19:27 +01:00
f29c874515 Merge branch 'master' into syncshells-images-combined 2025-10-27 20:19:03 +01:00
cake
b84d6c35d6 Moved notification on groups on new ones, Fixed new creation of profiles. 2025-10-27 19:08:25 +01:00
bd03fa6762 Syncshells Fix -
Reviewed-on: #24
written by: Abel / Cake
2025-10-26 19:48:18 +01:00
cake
8cde3b4933 Fixed image update from dto 2025-10-26 18:59:20 +01:00
defnotken
0c357aaf7c Merge remote-tracking branch 'origin/fix-images' into syncshells-images-combined 2025-10-26 12:31:34 -05:00
cake
ae09d79577 fix image results 2025-10-26 17:43:49 +01:00
azyges
cc24dc067e fix moderators + profiles 2025-10-27 00:59:56 +09:00
6ac56d38c0 Merge pull request 'lets try this' (#23) from sql-thing into master
Reviewed-on: #23
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-10-21 23:26:14 +02:00
defnotken
b7f7381dec lets try this 2025-10-21 16:16:45 -05:00
1ce7a718bb Merge pull request 'Banner Support for profiles, Some cleanup/refactoring. Country for metrics.' (#22) from server-changes into master
Reviewed-on: #22
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-10-21 22:50:54 +02:00
CakeAndBanana
46bb7a4a98 submodule update 2025-10-21 22:48:57 +02:00
CakeAndBanana
8752ce0e62 removal concept 2025-10-21 22:39:05 +02:00
CakeAndBanana
db0115316d Made new imageloadresult instead of null 2025-10-20 20:51:55 +02:00
CakeAndBanana
00d4632510 Reworked image handling, added banner for profiles. Made functions to start on xivauth. Refactored some code. 2025-10-20 20:46:20 +02:00
CakeAndBanana
e61e0db36b Removed logging 2025-10-20 15:52:47 +02:00
CakeAndBanana
8d82365d0e Made logging from information to warning 2025-10-20 15:43:29 +02:00
CakeAndBanana
b142329d09 Added some logging for country 2025-10-20 04:05:27 +02:00
CakeAndBanana
8a329ccbaa Added IP check on loopback 2025-10-20 03:27:47 +02:00
CakeAndBanana
23ee3f98b0 Removed some random characters 2025-10-20 03:15:37 +02:00
CakeAndBanana
f8e711f3c0 Redone array of labels for geoip 2025-10-20 03:12:27 +02:00
CakeAndBanana
73e7bb67bb Fixed metric for country 2025-10-20 03:07:07 +02:00
CakeAndBanana
70500b21e6 Add another label on guage metric 2025-10-20 03:03:59 +02:00
CakeAndBanana
698a9eddf7 Added new jwt claim for country, Moved models to correct folder instead of inside Lightlesshub.Groups 2025-10-20 02:30:40 +02:00
9cab73e8c8 Merge pull request 'Fallback Policy change' (#20) from authorization-shard into master
Reviewed-on: #20
2025-10-19 23:11:31 +02:00
5240beddf4 Merge branch 'master' into authorization-shard 2025-10-19 23:01:59 +02:00
cb4998e960 Merge pull request 'Reworked syncshell profile and user profile calls.' (#21) from syncshell-profiles-attempt-two into master
Reviewed-on: #21
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-10-19 21:41:38 +02:00
CakeAndBanana
884ad25c33 update submodule 2025-10-19 21:21:19 +02:00
CakeAndBanana
3926f3be89 remove blankspace 2025-10-19 21:04:22 +02:00
CakeAndBanana
d28198a9c8 fix migrations 2025-10-19 21:04:12 +02:00
CakeAndBanana
7cc6918b12 updated submodule 2025-10-19 20:58:40 +02:00
CakeAndBanana
dba7536a7f Added tags on call for user profile calls, added disabled on syncshell profiles. reworked the calls 2025-10-19 20:58:07 +02:00
CakeAndBanana
f35c0c4c2a updated submodule 2025-10-19 18:40:49 +02:00
CakeAndBanana
ad00f7b078 Changes in database for tags to be array integers instead of strings 2025-10-19 18:36:08 +02:00
CakeAndBanana
c30190704f Changed get/set profile with more safe handling 2025-10-19 17:53:20 +02:00
CakeAndBanana
bab81aaf51 Added null checks 2025-10-19 17:39:36 +02:00
CakeAndBanana
4fdc2a5c29 FIx to attempt to get group 2025-10-19 17:30:16 +02:00
CakeAndBanana
bbcf98576e Fixed so it can search on alias better 2025-10-19 17:22:25 +02:00
defnotken
1ac92f6da2 move shard controller. 2025-10-18 19:44:02 -05:00
defnotken
e7e4a4527a Testing something 2025-10-18 18:51:58 -05:00
583f1a8957 Merge pull request 'Fixed some issues with profiles on groups' (#15) from fix-profiles-syncshell into master
Reviewed-on: #15
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-10-17 00:09:46 +02:00
defnotken
2ebdd6e0c7 Merge branch 'master' into fix-profiles-syncshell 2025-10-16 16:32:31 -05:00
CakeAndBanana
2407259769 update submodule 2025-10-16 23:15:51 +02:00
03af0b853c Lightfinder-profiles
Reviewed-on: #18
2025-10-16 22:25:51 +02:00
azyges
53f663fcbf zzz 2025-10-17 00:32:43 +09:00
azyges
47a94cb79f shivering my timbers 2025-10-17 00:20:26 +09:00
f933b40368 LightfinderMetrics
Reviewed-on: #14
Reviewed-by: defnotken <defnotken@noreply.git.lightless-sync.org>
2025-10-16 00:12:56 +02:00
CakeAndBanana
b670cb69dd Updated submodule for dto 2025-10-15 23:25:54 +02:00
CakeAndBanana
50f3b0d644 Added default values for nsfw and disabled on set profile for groups 2025-10-15 23:24:43 +02:00
CakeAndBanana
3a6203844e Added support for nsfw and disabled for groups 2025-10-15 23:22:07 +02:00
CakeAndBanana
80086f6817 Merge branch 'fix-profiles-syncshell' of https://git.lightless-sync.org/Lightless-Sync/LightlessServer into fix-profiles-syncshell 2025-10-15 23:09:12 +02:00
7e565ff85e CDN on shards
Reviewed-on: #17
2025-10-15 21:32:58 +02:00
defnotken
49177e639e conflicts 2025-10-15 14:15:30 -05:00
defnotken
b36b1fb8f9 Add nsfw and disabled in db 2025-10-15 12:39:46 -05:00
azyges
79483205f1 cdn download support on shards + clean up 2025-10-16 01:15:31 +09:00
CakeAndBanana
707c565ea9 Inverted boolean for syncshells 2025-10-15 04:02:27 +02:00
CakeAndBanana
6beda853f7 Added metric of broadcasted syncshells 2025-10-15 03:58:00 +02:00
CakeAndBanana
23dc6d7ef4 Merge branch 'metrics-lightfinder' of https://git.lightless-sync.org/Lightless-Sync/LightlessServer into metrics-lightfinder 2025-10-15 02:47:27 +02:00
CakeAndBanana
f686f7a6da Added lightfinder metric on startup 2025-10-15 02:47:18 +02:00
CakeAndBanana
280cc2ebbb Fix submodule 2025-10-14 20:21:25 +02:00
CakeAndBanana
7909850ad5 Changed cancellation token. 2025-10-14 19:01:58 +02:00
CakeAndBanana
f60994fa58 update 2025-10-14 19:00:56 +02:00
CakeAndBanana
96f230cd21 merge 2025-10-14 19:00:45 +02:00
0fe1a43fb2 Merge branch 'master' into metrics-lightfinder 2025-10-14 18:56:37 +02:00
CakeAndBanana
43b9c6f90e Added lightfinder users in metrics 2025-10-14 18:45:57 +02:00
CakeAndBanana
59f3739b9c Fixed some issues with profiles on groups 2025-10-14 18:19:46 +02:00
aadfaca629 .gitmodules updated
Specified branch to omit errors on pulling submodules
2025-10-13 00:07:54 +02:00
729d781fa3 Merge pull request 'Server - LightFinder Rework' (#13) from server-lightfinder-rewrite into master
Reviewed-on: #13
2025-10-12 15:14:21 +02:00
defnotken
be95f24dcd conflictrs 2025-10-10 15:06:53 -05:00
defnotken
a1f9526c23 quick quick quick cleanup 2025-10-09 18:03:30 -05:00
defnotken
0450255d6d Update Submodule Endpoint 2025-10-09 18:00:06 -05:00
azyges
b6907a2704 cdn downloads support 2025-10-10 07:37:33 +09:00
azyges
479b80a5a0 lightfinder changes:
- removed all ability to provide your cid to the server through params, cid is gained from JWT claims
- improved verification of who owns a cid, which includes locking a cid to a uid
- locks and persisting entries of broadcasting are cleaned up on disconnection
- method identification logic was rewritten to fit these changes
2025-10-08 08:40:56 +09:00
d4d6e21381 Merge pull request 'Removal of cancellation tokens' (#11) from removal-cancellation-tokens into master
Reviewed-on: #11
2025-10-07 06:16:59 +02:00
CakeAndBanana
3d9fc4fba0 Removal of cancellation tokens 2025-10-05 19:05:32 +02:00
58f5f3ad85 Merge pull request '1.12.0-server' (#10) from 1.12.0-server into master
Reviewed-on: #10
2025-10-04 21:23:28 +02:00
defnotken
43219dd1e9 Allow kdb 2025-10-04 14:09:32 -05:00
defnotken
1655f99021 Update Submodule 2025-10-04 13:51:25 -05:00
azyges
610461fa99 adjusting notifications 2025-10-02 09:21:21 +09:00
azyges
d2dabddeb7 validate incoming cid's 2025-10-01 08:41:56 +09:00
azyges
ed13ee8921 lightfinder config, securing methods with stricter checking and added pair request notifications 2025-09-29 05:31:58 +09:00
azyges
6bc9da1519 adjust connection method 2025-09-26 23:41:17 +09:00
azyges
b9abdcfff7 update migrations 2025-09-26 22:36:51 +09:00
azyges
48cf492fa1 remove nullability 2025-09-26 20:25:08 +09:00
azyges
2b05223a4b added methods to update vanity colors and submodule bump 2025-09-26 18:53:47 +09:00
azyges
f5d621e354 expose vanity and colors and update from bot 2025-09-26 18:00:46 +09:00
CakeAndBanana
7271e007cd Renamed hub 2025-09-26 03:48:24 +02:00
azyges
323d3f39e2 uid colors 2025-09-26 08:26:24 +09:00
azyges
c4b6e85f60 bump submodule 2025-09-26 04:37:41 +09:00
azyges
4004cf289e clear lightfinder joiners 2025-09-26 04:31:42 +09:00
CakeAndBanana
e470e5346a Typo 2025-09-25 18:14:49 +02:00
CakeAndBanana
f084837e01 Updated submodule 2025-09-25 18:04:50 +02:00
b0e10d220c Merge pull request 'Endpoints changed and added for Groups' (#7) from endpoints_groups into 1.12.0-server
Reviewed-on: #7
2025-09-25 18:03:17 +02:00
CakeAndBanana
39aded4fb7 Changed prefix of syncshells from MSS to LSS 2025-09-25 17:42:09 +02:00
defnotken
f9f25829a0 Add logging to test 2025-09-25 10:00:16 -05:00
CakeAndBanana
7fecea2c6f Updated Submodule to groups 2025-09-25 05:24:54 +02:00
CakeAndBanana
81e773e0c4 Updated submodule 2025-09-25 05:24:07 +02:00
CakeAndBanana
825bb3b7d6 Cleaned up a bit. 2025-09-25 04:34:25 +02:00
CakeAndBanana
bf380688c8 Redoing of groupsgetall 2025-09-25 04:28:52 +02:00
CakeAndBanana
3a4a934d09 Revert of GroupFullInfoDto 2025-09-25 03:37:13 +02:00
CakeAndBanana
1a97dded9c Removal of an accidental change I did. 2025-09-25 03:14:09 +02:00
CakeAndBanana
03f633a273 Added lightless finder in dto of joining 2025-09-25 02:03:15 +02:00
CakeAndBanana
f1cbf32123 Merged lightfinder changes 2025-09-24 15:06:04 +02:00
CakeAndBanana
71c01461ae Lightfinder merge into group changes 2025-09-24 15:04:02 +02:00
azyges
5b3fe6e240 lightfinder! 2025-09-24 06:33:56 +09:00
CakeAndBanana
6fb5f6e9a7 Added client sendback of profileDTO 2025-09-17 05:37:04 +02:00
CakeAndBanana
931ca0d622 Added parameters 2025-09-17 05:19:37 +02:00
CakeAndBanana
f0e7280d7d Rebase 2025-09-17 05:14:26 +02:00
defnotken
b669e2cb24 Adding group profile to the group model 2025-09-16 19:54:31 -05:00
CakeAndBanana
deea39d621 Added get of group profile, removed group from model. redone group data. 2025-09-17 02:38:20 +02:00
CakeAndBanana
f5b03846fe Added changes for the profiles to be returned and be able to be changed. 2025-09-17 02:07:46 +02:00
defnotken
0df7ee424d db changes 2025-09-16 15:03:15 -05:00
defnotken
81261fae49 Database changes for syncshell changes 2025-09-16 09:52:15 -05:00
d7e8be97ff make lower limit 3 characters. add forbidden words. (#4)
Co-authored-by: defnotken <itsdefnotken@gmail.com>
Reviewed-on: #4
2025-09-09 19:01:41 +02:00
8217d99478 Added Ban and Unban calls
Co-authored-by: defnotken <itsdefnotken@gmail.com>
Reviewed-on: #2
2025-09-06 00:15:19 +02:00
5e37ff86e7 Merge pull request 'jwtfixes' (#1) from jwtfixes into master
Meow meow meow meow
2025-09-05 18:06:27 +02:00
defnotken
d27f5f3df0 I love auth 2025-09-05 11:05:09 -05:00
defnotken
d98062a4fe testing jwt 2025-09-05 11:00:13 -05:00
defnotken
b782b0694f Fixing submodule 2025-09-01 15:39:10 -05:00
5188d55068 Moved Docker setup 2025-09-01 20:03:16 +00:00
232 changed files with 25111 additions and 4316 deletions

5
.gitignore vendored
View File

@@ -350,4 +350,7 @@ MigrationBackup/
.ionide/
# docker run data
Docker/run/data/
Docker/run/data/
#idea files
*.idea

3
.gitmodules vendored
View File

@@ -1,3 +1,4 @@
[submodule "LightlessAPI"]
path = LightlessAPI
url = https://github.com/Light-Public-Syncshells/LightlessAPI
url = https://git.lightless-sync.org/Lightless-Sync/LightlessAPI
branch = main

View File

@@ -1,39 +0,0 @@
# Mare Synchronos Docker Setup
This is primarily aimed at developers who want to spin up their own local server for development purposes without having to spin up a VM.
Obligatory requires Docker to be installed on the machine.
There are two directories: `build` and `run`
## 1. build images
There is two ways to build the necessary docker images which are differentiated by the folders `-local` and `-git`
- -local will run the image build against the current locally present sources
- -git will run the image build against the latest git main commit
It is possible to build all required images at once by running `docker-build.bat/sh` (Server, Servies, StaticFilesServer) or all 3 separately with `docker-build-<whatever>.bat/sh`
## 2. Configure ports + token
You should set up 2 environment variables that hold server specific configuration and open up ports.
The default ports used through the provided configuration are `6000` for the main server and `6200` as well as `6201` for the files downloads.
Both ports should be open to your computer through your router if you wish to test this with clients.
Furthermore there are two environment variables `DEV_MARE_CDNURL` and `DEV_MARE_DISCORDTOKEN` which you are required to set.
`DEV_MARE_CDNURL` should point to `http://<yourip or dyndns>:6200/cache/` and `DEV_MARE_DISCORDTOKEN` is an oauth token from a bot you need to create through the Discord bot portal.
You should also set `DEV_MARE_CDNURL2` to `http://<yourip or dyndns>:6201/cache/`
It is enough to set them as User variables. The compose files refer to those environment variables to overwrite configuration settings for the Server and Services to set those respective values.
It is also possible to set those values in the configuration.json files themselves.
Without a valid Discord bot you will not be able to register accounts without fumbling around in the PostgreSQL database.
## 3. Run Mare Server
The run folder contains two major Mare configurations which is `standalone` and `sharded`.
Both configurations default to port `6000` for the main server connection and `6200` for the files downloads. Sharded configuration additionally uses `6201` for downloads. No HTTPS.
All `appsettings.json` configurations provided are extensive at the point of writing, note the differences between the shard configurations and the main servers respectively.
They can be used as examples if you want to spin up your own servers otherwise.
The scripts to start the respective services are divided by name, the `daemon-start/stop` files use `compose up -d` to run it in the background and to be able to stop the containers as well.
The respective docker-compose files lie in the `compose` folder. I would not recommend editing them unless you know what you are doing.
All data (postgresql and files uploads) will be thrown into the `data` folder after startup.
All logs from the mare services will be thrown into `logs`, divided by shard, where applicable.
The `standalone` configuration features PostgeSQL, Mare Server, Mare StaticFilesServer and Mare Services.
The `sharded` configuration features PostgreSQL, Redis, HAProxy, Mare Server Main, 2 Mare Server Shards, Mare Services, Mare StaticFilesServer Main and 2 Mare StaticFilesServer Shards.
Haproxy is set up that it takes the same ports as the `standalone` configuration and distributes the connections between the shards.
In theory it should be possible to switch between the `standalone` and `sharded` configuration by shutting down one composition container and starting up the other. They share the same Database.

View File

@@ -1,32 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as BUILD
COPY MareAPI /server/MareAPI
COPY MareSynchronosServer/MareSynchronosShared /server/MareSynchronosServer/MareSynchronosShared
COPY MareSynchronosServer/MareSynchronosAuthService /server/MareSynchronosServer/MareSynchronosAuthService
WORKDIR /server/MareSynchronosServer/MareSynchronosAuthService/
RUN dotnet publish \
--configuration=Debug \
--os=linux \
--output=/build \
MareSynchronosAuthService.csproj
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /build /opt/MareSynchronosAuthService
RUN chown -R mare:mare /opt/MareSynchronosAuthService
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosAuthService
CMD ["./MareSynchronosAuthService"]

View File

@@ -1,30 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as BUILD
RUN git clone --recurse-submodules https://github.com/Penumbra-Sync/server
WORKDIR /server/MareSynchronosServer/MareSynchronosAuthService/
RUN dotnet publish \
--configuration=Release \
--os=linux \
--output=/MareSynchronosAuthService \
MareSynchronosAuthService.csproj
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /MareSynchronosAuthService /opt/MareSynchronosAuthService
RUN chown -R mare:mare /opt/MareSynchronosAuthService
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosAuthService
CMD ["./MareSynchronosAuthService"]

View File

@@ -1,32 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as BUILD
COPY MareAPI /server/MareAPI
COPY MareSynchronosServer/MareSynchronosShared /server/MareSynchronosServer/MareSynchronosShared
COPY MareSynchronosServer/MareSynchronosServer /server/MareSynchronosServer/MareSynchronosServer
WORKDIR /server/MareSynchronosServer/MareSynchronosServer/
RUN dotnet publish \
--configuration=Release \
--os=linux \
--output=/build \
MareSynchronosServer.csproj
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /build /opt/MareSynchronosServer
RUN chown -R mare:mare /opt/MareSynchronosServer
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosServer
CMD ["./MareSynchronosServer"]

View File

@@ -1,30 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as BUILD
RUN git clone --recurse-submodules https://github.com/Penumbra-Sync/server
WORKDIR /server/MareSynchronosServer/MareSynchronosServer/
RUN dotnet publish \
--configuration=Release \
--os=linux \
--output=/MareSynchronosServer \
MareSynchronosServer.csproj
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /MareSynchronosServer /opt/MareSynchronosServer
RUN chown -R mare:mare /opt/MareSynchronosServer
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosServer
CMD ["./MareSynchronosServer"]

View File

@@ -1,32 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as BUILD
COPY MareAPI /server/MareAPI
COPY MareSynchronosServer/MareSynchronosShared /server/MareSynchronosServer/MareSynchronosShared
COPY MareSynchronosServer/MareSynchronosServices /server/MareSynchronosServer/MareSynchronosServices
WORKDIR /server/MareSynchronosServer/MareSynchronosServices/
RUN dotnet publish \
--configuration=Debug \
--os=linux \
--output=/build \
MareSynchronosServices.csproj
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /build /opt/MareSynchronosServices
RUN chown -R mare:mare /opt/MareSynchronosServices
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosServices
CMD ["./MareSynchronosServices"]

View File

@@ -1,30 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as BUILD
RUN git clone --recurse-submodules https://github.com/Penumbra-Sync/server
WORKDIR /server/MareSynchronosServer/MareSynchronosServices/
RUN dotnet publish \
--configuration=Release \
--os=linux \
--output=/MareSynchronosServices \
MareSynchronosServices.csproj
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /MareSynchronosServices /opt/MareSynchronosServices
RUN chown -R mare:mare /opt/MareSynchronosServices
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosServices
CMD ["./MareSynchronosServices"]

View File

@@ -1,32 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as BUILD
COPY MareAPI /server/MareAPI
COPY MareSynchronosServer/MareSynchronosShared /server/MareSynchronosServer/MareSynchronosShared
COPY MareSynchronosServer/MareSynchronosStaticFilesServer /server/MareSynchronosServer/MareSynchronosStaticFilesServer
WORKDIR /server/MareSynchronosServer/MareSynchronosStaticFilesServer/
RUN dotnet publish \
--configuration=Release \
--os=linux \
--output=/build \
MareSynchronosStaticFilesServer.csproj
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /build /opt/MareSynchronosStaticFilesServer
RUN chown -R mare:mare /opt/MareSynchronosStaticFilesServer
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosStaticFilesServer
CMD ["./MareSynchronosStaticFilesServer"]

View File

@@ -1,30 +0,0 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 as BUILD
RUN git clone --recurse-submodules https://github.com/Penumbra-Sync/server
WORKDIR /server/MareSynchronosServer/MareSynchronosStaticFilesServer/
RUN dotnet publish \
--configuration=Release \
--os=linux \
--output=/MareSynchronosStaticFilesServer \
MareSynchronosStaticFilesServer.csproj
FROM mcr.microsoft.com/dotnet/aspnet:8.0
RUN adduser \
--disabled-password \
--group \
--no-create-home \
--quiet \
--system \
mare
COPY --from=BUILD /MareSynchronosStaticFilesServer /opt/MareSynchronosStaticFilesServer
RUN chown -R mare:mare /opt/MareSynchronosStaticFilesServer
RUN apt-get update; apt-get install curl -y
USER mare:mare
WORKDIR /opt/MareSynchronosStaticFilesServer
CMD ["./MareSynchronosStaticFilesServer"]

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker build -t darkarchon/mare-synchronos-authservice:latest . -f ../Dockerfile-MareSynchronosAuthService-git --no-cache --pull --force-rm

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker build -t darkarchon/mare-synchronos-server:latest . -f ../Dockerfile-MareSynchronosServer-git --no-cache --pull --force-rm

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker build -t darkarchon/mare-synchronos-services:latest . -f ../Dockerfile-MareSynchronosServices-git --no-cache --pull --force-rm

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker build -t darkarchon/mare-synchronos-staticfilesserver:latest . -f ../Dockerfile-MareSynchronosStaticFilesServer-git --no-cache --pull --force-rm

View File

@@ -1,5 +0,0 @@
#!/bin/sh
./docker-build-server.sh
./docker-build-authservice.sh
./docker-build-services.sh
./docker-build-staticfilesserver.sh

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker build -t darkarchon/mare-synchronos-authservice:latest . -f ../Dockerfile-MareSynchronosAuthService --no-cache --pull --force-rm

View File

@@ -1,4 +0,0 @@
#!/bin/sh
cd ../../../
docker build -t darkarchon/mare-synchronos-server:latest . -f ../Dockerfile-MareSynchronosServer --no-cache --pull --force-rm
cd Docker/build/linux-local

View File

@@ -1,4 +0,0 @@
#!/bin/sh
cd ../../../
docker build -t darkarchon/mare-synchronos-services:latest . -f ../Dockerfile-MareSynchronosServices --no-cache --pull --force-rm
cd Docker/build/linux-local

View File

@@ -1,4 +0,0 @@
#!/bin/sh
cd ../../../
docker build -t darkarchon/mare-synchronos-staticfilesserver:latest . -f ../Dockerfile-MareSynchronosStaticFilesServer --no-cache --pull --force-rm
cd Docker/build/linux-local

View File

@@ -1,5 +0,0 @@
#!/bin/sh
./docker-build-server.sh
./docker-build-authservice.sh
./docker-build-services.sh
./docker-build-staticfilesserver.sh

View File

@@ -1,3 +0,0 @@
@echo off
docker build -t darkarchon/mare-synchronos-authservice:latest . -f ..\Dockerfile-MareSynchronosAuthService-git --no-cache --pull --force-rm

View File

@@ -1,2 +0,0 @@
@echo off
docker build -t darkarchon/mare-synchronos-server:latest . -f ..\Dockerfile-MareSynchronosServer-git --no-cache --pull --force-rm

View File

@@ -1,3 +0,0 @@
@echo off
docker build -t darkarchon/mare-synchronos-services:latest . -f ..\Dockerfile-MareSynchronosServices-git --no-cache --pull --force-rm

View File

@@ -1,3 +0,0 @@
@echo off
docker build -t darkarchon/mare-synchronos-staticfilesserver:latest . -f ..\Dockerfile-MareSynchronosStaticFilesServer-git --no-cache --pull --force-rm

View File

@@ -1,6 +0,0 @@
@echo off
call docker-build-server.bat
call docker-build-authservice.bat
call docker-build-services.bat
call docker-build-staticfilesserver.bat

View File

@@ -1,4 +0,0 @@
@echo off
cd ..\..\..\
docker build -t darkarchon/mare-synchronos-authservice:latest . -f Docker\build\Dockerfile-MareSynchronosAuthService --no-cache --pull --force-rm
cd Docker\build\windows-local

View File

@@ -1,4 +0,0 @@
@echo off
cd ..\..\..\
docker build -t darkarchon/mare-synchronos-server:latest . -f Docker\build\Dockerfile-MareSynchronosServer --no-cache --pull --force-rm
cd Docker\build\windows-local

View File

@@ -1,4 +0,0 @@
@echo off
cd ..\..\..\
docker build -t darkarchon/mare-synchronos-services:latest . -f Docker\build\Dockerfile-MareSynchronosServices --no-cache --pull --force-rm
cd Docker\build\windows-local

View File

@@ -1,4 +0,0 @@
@echo off
cd ..\..\..\
docker build -t darkarchon/mare-synchronos-staticfilesserver:latest . -f Docker\build\Dockerfile-MareSynchronosStaticFilesServer --no-cache --pull --force-rm
cd Docker\build\windows-local

View File

@@ -1,6 +0,0 @@
@echo off
call docker-build-server.bat
call docker-build-authservice.bat
call docker-build-services.bat
call docker-build-staticfilesserver.bat

View File

@@ -1,145 +0,0 @@
services:
postgres:
image: postgres:latest
restart: always
environment:
POSTGRES_DB:
POSTGRES_USER:
POSTGRES_PASSWORD:
volumes:
- ../data/postgresql/:/var/lib/postgresql/data
- postgres_socket:/var/run/postgresql:rw
healthcheck:
test: ["CMD-SHELL", "pg_isready -U "]
interval: 5s
start_period: 5s
timeout: 5s
retries: 5
haproxy:
image: haproxy:latest
restart: always
ports:
- 6000:6000/tcp
volumes:
- ../config/sharded/haproxy-shards.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
depends_on:
mare-server:
condition: service_healthy
redis:
image: redis:latest
command: [sh, -c, "rm -f /data/dump.rdb && redis-server --save \"\" --appendonly no --requirepass secretredispassword"]
volumes:
- cache:/data
mare-server:
image: darkarchon/mare-synchronos-server:latest
restart: on-failure
environment:
MareSynchronos__CdnFullUrl: "${DEV_MARE_CDNURL}"
volumes:
- ../config/sharded/server-shard-main.json:/opt/MareSynchronosServer/appsettings.json
- ../log/server-shard-main/:/opt/MareSynchronosServer/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:6000/health || exit 1"]
retries: 60
start_period: 10s
timeout: 1s
mare-shard-1:
image: darkarchon/mare-synchronos-server:latest
restart: on-failure
volumes:
- ../config/sharded/server-shard-1.json:/opt/MareSynchronosServer/appsettings.json
- ../log/server-shard-1/:/opt/MareSynchronosServer/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
depends_on:
mare-server:
condition: service_healthy
mare-shard-2:
image: darkarchon/mare-synchronos-server:latest
restart: on-failure
volumes:
- ../config/sharded/server-shard-2.json:/opt/MareSynchronosServer/appsettings.json
- ../log/server-shard-2/:/opt/MareSynchronosServer/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
depends_on:
mare-server:
condition: service_healthy
mare-services:
image: darkarchon/mare-synchronos-services:latest
restart: on-failure
environment:
MareSynchronos__DiscordBotToken: "${DEV_MARE_DISCORDTOKEN}"
MareSynchronos__DiscordChannelForMessages: "${DEV_MARE_DISCORDCHANNEL}"
volumes:
- ../config/standalone/services-standalone.json:/opt/MareSynchronosServices/appsettings.json
- ../log/services-standalone/:/opt/MareSynchronosServices/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
depends_on:
mare-server:
condition: service_healthy
mare-files:
image: darkarchon/mare-synchronos-staticfilesserver:latest
restart: on-failure
ports:
- 6200:6200/tcp
environment:
MareSynchronos__CdnShardConfiguration__0__CdnFullUrl: "${DEV_MARE_FILES1}"
MareSynchronos__CdnShardConfiguration__0__FileMatch: "^[012345678]"
MareSynchronos__CdnShardConfiguration__1__CdnFullUrl: "${DEV_MARE_FILES2}"
MareSynchronos__CdnShardConfiguration__1__FileMatch: "^[789ABCDEF]"
volumes:
- ../config/sharded/files-shard-main.json:/opt/MareSynchronosStaticFilesServer/appsettings.json
- ../log/files-standalone/:/opt/MareSynchronosStaticFilesServer/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
- ../data/files-shard-main/:/marecache/:rw
depends_on:
mare-server:
condition: service_healthy
healthcheck:
test: curl --fail http://localhost:6200/health || exit 1
retries: 60
start_period: 10s
timeout: 1s
mare-files-shard-1:
image: darkarchon/mare-synchronos-staticfilesserver:latest
restart: on-failure
volumes:
- ../config/sharded/files-shard-1.json:/opt/MareSynchronosStaticFilesServer/appsettings.json
- ../log/files-shard-1/:/opt/MareSynchronosStaticFilesServer/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
- ../data/files-shard-1/:/marecache/:rw
ports:
- 6201:6200/tcp
depends_on:
mare-files:
condition: service_healthy
mare-files-shard-2:
image: darkarchon/mare-synchronos-staticfilesserver:latest
restart: on-failure
volumes:
- ../config/sharded/files-shard-2.json:/opt/MareSynchronosStaticFilesServer/appsettings.json
- ../log/files-shard-2/:/opt/MareSynchronosStaticFilesServer/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
- ../data/files-shard-2/:/marecache/:rw
ports:
- 6202:6200/tcp
depends_on:
mare-files:
condition: service_healthy
volumes:
cache:
driver: local
postgres_socket:

View File

@@ -1,106 +0,0 @@
services:
postgres:
image: postgres:latest
command: ["postgres", "-c", "log_statement=all"]
restart: always
ports:
- 5432:5432/tcp
environment:
POSTGRES_DB: -DB NAME HERE-
POSTGRES_USER: -USER HERE-
POSTGRES_PASSWORD: -PASS HERE-
volumes:
- ../data/postgresql/:/var/lib/postgresql/data
- postgres_socket:/var/run/postgresql:rw
healthcheck:
test: ["CMD-SHELL", "pg_isready -U -USER HERE-"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:latest
command: [sh, -c, "rm -f /data/dump.rdb && redis-server --save \"\" --appendonly no --requirepass -PASS HERE-"]
volumes:
- cache:/data
lightless-server:
image: lightless/server:local
restart: on-failure
ports:
- 6000:6000/tcp
- 6050:6050/tcp
environment:
LightlessSync__CdnFullUrl: "${DEV_LIGHTLESS_CDNURL}"
LightlessSync__XIVAPIKey: "${DEV_LIGHTLESS_XIVAPIKEY}"
DOTNET_USE_POLLING_FILE_WATCHER: 1
volumes:
- ../config/standalone/server-standalone.json:/opt/LightlessSyncServer/appsettings.json
- ../log/server-standalone/:/opt/LightlessSyncServer/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:6000/health || exit 1"]
retries: 60
start_period: 10s
timeout: 1s
lightless-auth:
image: lightless/auth:local
restart: on-failure
environment:
DOTNET_USE_POLLING_FILE_WATCHER: 1
volumes:
- ../config/standalone/authservice-standalone.json:/opt/LightlessSyncAuthService/appsettings.json
- ../log/authservice-standalone/:/opt/LightlessSyncAuthService/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
depends_on:
lightless-server:
condition: service_healthy
postgres:
condition: service_healthy
lightless-services:
image: lightless/services:local
restart: on-failure
environment:
LightlessSync__DiscordBotToken: "${DEV_LIGHTLESS_DISCORDTOKEN}"
LightlessSync__DiscordChannelForMessages: "${DEV_LIGHTLESS_DISCORDCHANNEL}"
LightlessSync__DiscordChannelForReports: "${DEV_LIGHTLESS_DISCORDCHANNEL}"
LightlessSync__DiscordChannelForCommands: "${DEV_LIGHTLESS_DISCORDCHANNEL}"
DOTNET_USE_POLLING_FILE_WATCHER: 1
volumes:
- ../config/standalone/services-standalone.json:/opt/LightlessSyncServices/appsettings.json
- ../log/services-standalone/:/opt/LightlessSyncServices/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
depends_on:
lightless-server:
condition: service_healthy
postgres:
condition: service_healthy
lightless-files:
image: lightless/files:local
ports:
- 6200:6200/tcp
restart: on-failure
environment:
LightlessSync__CdnFullUrl: "${DEV_LIGHTLESS_CDNURL}"
DOTNET_USE_POLLING_FILE_WATCHER: 1
volumes:
- ../config/standalone/files-standalone.json:/opt/LightlessSyncStaticFilesServer/appsettings.json
- ../log/files-standalone/:/opt/LightlessSyncStaticFilesServer/logs/:rw
- postgres_socket:/var/run/postgresql/:rw
- ../data/files-standalone/:/lightlesscache/:rw
depends_on:
postgres:
condition: service_healthy
lightless-server:
condition: service_healthy
volumes:
postgres_socket:
cache:
driver: local

View File

@@ -1,53 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=mare;Username=mare;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"MareSynchronosStaticFilesServer": "Debug",
"MareSynchronosShared": "Information",
"System.IO": "Information"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/mare-<date:HH>-<counter:0000>.log"
}
]
}
},
"MareSynchronos": {
"DbContextPoolSize": 512,
"ShardName": "Files Shard 1",
"MetricsPort": 6250,
"ForcedDeletionOfFilesAfterHours": 2,
"CacheSizeHardLimitInGiB": 5,
"UnusedFileRetentionPeriodInDays": 14,
"CacheDirectory": "/marecache/",
"DownloadTimeoutSeconds": 30,
"DownloadQueueSize": 50,
"DownloadQueueReleaseSeconds": 15,
"RedisConnectionString": "redis,password=secretredispassword",
"Jwt": "teststringteststringteststringteststringteststringteststringteststringteststringteststringteststring",
"MainServerAddress": "http://mare-server:6000",
"MainFileServerAddress": "http://mare-files:6200"
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:6200"
}
}
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,53 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=mare;Username=mare;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"MareSynchronosStaticFilesServer": "Debug",
"MareSynchronosShared": "Information",
"System.IO": "Information"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/mare-<date:HH>-<counter:0000>.log"
}
]
}
},
"MareSynchronos": {
"DbContextPoolSize": 512,
"ShardName": "Files Shard 2",
"MetricsPort": 6250,
"ForcedDeletionOfFilesAfterHours": 2,
"CacheSizeHardLimitInGiB": 5,
"UnusedFileRetentionPeriodInDays": 14,
"CacheDirectory": "/marecache/",
"DownloadTimeoutSeconds": 30,
"DownloadQueueSize": 50,
"DownloadQueueReleaseSeconds": 15,
"RedisConnectionString": "redis,password=secretredispassword",
"Jwt": "teststringteststringteststringteststringteststringteststringteststringteststringteststringteststring",
"MainServerAddress": "http://mare-server:6000",
"MainFileServerAddress": "http://mare-files:6200"
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:6200"
}
}
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,56 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=mare;Username=mare;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"MareSynchronosStaticFilesServer": "Information",
"MareSynchronosShared": "Information",
"System.IO": "Information"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/mare-<date:HH>-<counter:0000>.log"
}
]
}
},
"MareSynchronos": {
"DbContextPoolSize": 512,
"ShardName": "Files",
"MetricsPort": 6250,
"FileServerGrpcAddress": "",
"ForcedDeletionOfFilesAfterHours": -1,
"CacheSizeHardLimitInGiB": -1,
"UnusedFileRetentionPeriodInDays": 14,
"CacheDirectory": "/marecache/",
"RemoteCacheSourceUri": "",
"RedisConnectionString": "redis,password=secretredispassword",
"Jwt": "teststringteststringteststringteststringteststringteststringteststringteststringteststringteststring",
"MainServerAddress": "http://mare-server:6000",
"MainFileServerAddress": ""
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:6200"
},
"Grpc": {
"Protocols": "Http2",
"Url": "http://+:6205"
}
}
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,30 +0,0 @@
global
log /dev/log local0
log /dev/log local1 notice
daemon
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
frontend mare
bind :6000
default_backend mare-servers
backend mare-servers
balance leastconn
cookie SERVER insert indirect nocache
server mare1 mare-shard-1:6000 cookie mare1
server mare2 mare-shard-2:6000 cookie mare2

View File

@@ -1,45 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=mare;Username=mare;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"MareSynchronosServer": "Information",
"MareSynchronosShared": "Information",
"System.IO": "Information"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/mare-<date:HH>-<counter:0000>.log"
}
]
}
},
"MareSynchronos": {
"DbContextPoolSize": 512,
"ShardName": "Shard 1",
"MetricsPort": 6050,
"MainServerAddress": "http://mare-server:6000",
"RedisConnectionString": "redis,password=secretredispassword",
"Jwt": "teststringteststringteststringteststringteststringteststringteststringteststringteststringteststring"
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:6000"
}
}
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,45 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=mare;Username=mare;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"MareSynchronosServer": "Information",
"MareSynchronosShared": "Information",
"System.IO": "Information"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/mare-<date:HH>-<counter:0000>.log"
}
]
}
},
"MareSynchronos": {
"DbContextPoolSize": 512,
"ShardName": "Shard 2",
"MetricsPort": 6050,
"MainServerAddress": "http://mare-server:6000",
"RedisConnectionString": "redis,password=secretredispassword",
"Jwt": "teststringteststringteststringteststringteststringteststringteststringteststringteststringteststring"
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:6000"
}
}
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,71 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=mare;Username=mare;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"MareSynchronosServer": "Information",
"MareSynchronosShared": "Information",
"System.IO": "Information"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/mare-<date:HH>-<counter:0000>.log"
}
]
}
},
"MareSynchronos": {
"DbContextPoolSize": 512,
"ShardName": "Main",
"MetricsPort": 6050,
"MainServerGrpcAddress": "",
"FailedAuthForTempBan": 5,
"TempBanDurationInMinutes": 5,
"Jwt": "teststringteststringteststringteststringteststringteststringteststringteststringteststringteststring",
"WhitelistedIps": [
""
],
"RedisConnectionString": "redis,password=secretredispassword",
"CdnFullUrl": "http://localhost:6200/",
"StaticFileServiceAddress": "http://mare-files:6205",
"MaxExistingGroupsByUser": 3,
"MaxJoinedGroupsByUser": 6,
"MaxGroupUserCount": 100,
"PurgeUnusedAccounts": false,
"PurgeUnusedAccountsPeriodInDays": 14,
"CdnShardConfiguration": [
{
"FileMatch": "^[01234567]",
"CdnFullUrl": ""
},
{
"FileMatch": "^[89ABCDEF]",
"CdnFullUrl": ""
}
]
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:6000"
},
"Grpc": {
"Protocols": "Http2",
"Url": "http://+:6005"
}
}
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,42 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=;Username=;Password=;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"LightlessSyncServices": "Information",
"LightlessSyncShared": "Information",
"System.IO": "Information"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/lightless-<date:HH>-<counter:0000>.log"
}
]
}
},
"LightlessSync": {
"DbContextPoolSize": 512,
"ShardName": "AuthServices",
"MetricsPort": 6150,
"Jwt": "",
"RedisConnectionString": "redis:6379,password=",
"FailedAuthForTempBan": 5,
"UseGeoIP": false,
"GeoIPDbCityFile": ""
},
"AllowedHosts": "*",
"Kestrel": {
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,53 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=;Username=;Password=;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"LightlessSyncStaticFilesServer": "Debug",
"LightlessSyncShared": "Debug",
"System.IO": "Information",
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/lightless-<date:HH>-<counter:0000>.log"
}
]
}
},
"LightlessSync": {
"DbContextPoolSize": 512,
"ShardName": "Files",
"MetricsPort": 6250,
"ForcedDeletionOfFilesAfterHours": -1,
"CacheSizeHardLimitInGiB": -1,
"UnusedFileRetentionPeriodInDays": 14,
"CacheDirectory": "/lightlesscache/",
"RemoteCacheSourceUri": "",
"MainServerAddress": "http://-IPorDomainhere-:6000/",
"RedisConnectionString": "redis:6379,password=",
"MainFileServerAddress": "",
"Jwt": "",
"UseColdStorage": false,
"IsDistributionNode": true
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:6200"
}
}
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,60 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=;Username=;Password=;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"Microsoft.EntityFramework": "Warning",
"LightlessSyncServer": "Debug",
"LightlessSyncShared": "Debug",
"System.IO": "Information",
"LightlessSyncServer.Services.SystemInfoService": "Warning"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/lightless-<date:HH>-<counter:0000>.log"
}
]
}
},
"LightlessSync": {
"DbContextPoolSize": 512,
"ShardName": "Main",
"MetricsPort": 6050,
"MainServerAddress": "",
"FailedAuthForTempBan": 5,
"TempBanDurationInMinutes": 5,
"Jwt": "",
"WhitelistedIps": [
""
],
"RedisConnectionString": "redis:6379,password=",
"CdnFullUrl": "http://localhost:6200",
"MaxExistingGroupsByUser": 12,
"MaxJoinedGroupsByUser": 20,
"MaxGroupUserCount": 100,
"PurgeUnusedAccounts": false,
"PurgeUnusedAccountsPeriodInDays": 14,
"ExpectedClientVersion": "0.9.0",
"XIVAPIKey": ""
},
"AllowedHosts": "*",
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://+:6000"
}
}
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,46 +0,0 @@
{
"ConnectionStrings": {
"DefaultConnection": "Host=/var/run/postgresql;Port=5432;Database=;Username=;Password=;Keepalive=15;Minimum Pool Size=10;Maximum Pool Size=50;No Reset On Close=true;Max Auto Prepare=50;Enlist=false"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"LightlessSyncServices": "Information",
"LightlessSyncShared": "Information",
"System.IO": "Information"
},
"File": {
"BasePath": "logs",
"FileAccessMode": "KeepOpenAndAutoFlush",
"FileEncodingName": "utf-8",
"DateFormat": "yyyMMdd",
"MaxFileSize": 104857600,
"Files": [
{
"Path": "<date:yyyy>/<date:MM>/<date:dd>/lightless-<date:HH>-<counter:0000>.log"
}
]
}
},
"LightlessSync": {
"DbContextPoolSize": 512,
"ShardName": "Services",
"MetricsPort": 6150,
"CdnFullUrl": "http://localhost:6200/",
"MainServerAddress": "http://-IPorDomainHere-:6000/",
"MainServerGrpcAddress": "http://-IPorDomainHere-:6005/",
"DiscordBotToken": "",
"DiscordChannelForMessages": "",
"DiscordChannelForCommands": "",
"Jwt": "",
"RedisConnectionString": "redis:6379,password=",
"VanityRoles": {"1408568079394537684":"Lightless Developer", "1349429584688578584":"Mods", "1401582542238388355":"Patreon", "1409255218591432817":"Kofi", "1409253125952507904":"Pure"}
},
"AllowedHosts": "*",
"Kestrel": {
},
"IpRateLimiting": {},
"IPRateLimitPolicies": {}
}

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker compose -f compose/mare-sharded.yml -p sharded up -d

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker compose -f compose/mare-sharded.yml -p sharded stop

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker compose -f compose/mare-sharded.yml -p sharded up

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker compose -f compose/mare-standalone.yml -p standalone up -d

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker compose -f compose/mare-standalone.yml -p standalone stop

View File

@@ -1,2 +0,0 @@
#!/bin/sh
docker compose -f compose/mare-standalone.yml -p standalone up

View File

@@ -1,2 +0,0 @@
@echo off
docker compose -f compose\mare-sharded.yml -p sharded up -d

View File

@@ -1,2 +0,0 @@
@echo off
docker compose -f compose\mare-sharded.yml -p sharded stop

View File

@@ -1,2 +0,0 @@
@echo off
docker compose -f compose\mare-sharded.yml -p sharded up

View File

@@ -1,2 +0,0 @@
@echo off
docker compose -f compose\mare-standalone.yml -p standalone up -d

View File

@@ -1,2 +0,0 @@
@echo off
docker compose -f compose\mare-standalone.yml -p standalone stop

View File

@@ -1,2 +0,0 @@
@echo off
docker compose -f compose\mare-standalone.yml -p standalone up

1
LightlessAPI Submodule

Submodule LightlessAPI added at 4ecd5375e6

View File

@@ -1,350 +0,0 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/

View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2022 Mare Synchronos
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,37 +0,0 @@
using LightlessSync.API.Data.Enum;
using MessagePack;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace LightlessSync.API.Data;
[MessagePackObject(keyAsPropertyName: true)]
public class CharacterData
{
public CharacterData()
{
DataHash = new(() =>
{
var json = JsonSerializer.Serialize(this);
#pragma warning disable SYSLIB0021 // Type or member is obsolete
using SHA256CryptoServiceProvider cryptoProvider = new();
#pragma warning restore SYSLIB0021 // Type or member is obsolete
return BitConverter.ToString(cryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(json))).Replace("-", "", StringComparison.Ordinal);
});
}
public Dictionary<ObjectKind, string> CustomizePlusData { get; set; } = new();
[JsonIgnore]
public Lazy<string> DataHash { get; }
public Dictionary<ObjectKind, List<FileReplacementData>> FileReplacements { get; set; } = new();
public Dictionary<ObjectKind, string> GlamourerData { get; set; } = new();
public string HeelsData { get; set; } = string.Empty;
public string HonorificData { get; set; } = string.Empty;
public string ManipulationData { get; set; } = string.Empty;
public string MoodlesData { get; set; } = string.Empty;
public string PetNamesData { get; set; } = string.Empty;
}

View File

@@ -1,22 +0,0 @@
namespace LightlessSync.API.Data.Comparer;
public class GroupDataComparer : IEqualityComparer<GroupData>
{
private static GroupDataComparer _instance = new GroupDataComparer();
private GroupDataComparer()
{ }
public static GroupDataComparer Instance => _instance;
public bool Equals(GroupData? x, GroupData? y)
{
if (x == null || y == null) return false;
return x.GID.Equals(y.GID, StringComparison.Ordinal);
}
public int GetHashCode(GroupData obj)
{
return obj.GID.GetHashCode();
}
}

View File

@@ -1,24 +0,0 @@
using LightlessSync.API.Dto.Group;
namespace LightlessSync.API.Data.Comparer;
public class GroupDtoComparer : IEqualityComparer<GroupDto>
{
private static GroupDtoComparer _instance = new GroupDtoComparer();
private GroupDtoComparer()
{ }
public static GroupDtoComparer Instance => _instance;
public bool Equals(GroupDto? x, GroupDto? y)
{
if (x == null || y == null) return false;
return x.GID.Equals(y.GID, StringComparison.Ordinal);
}
public int GetHashCode(GroupDto obj)
{
return obj.Group.GID.GetHashCode();
}
}

View File

@@ -1,24 +0,0 @@
using LightlessSync.API.Dto.Group;
namespace LightlessSync.API.Data.Comparer;
public class GroupPairDtoComparer : IEqualityComparer<GroupPairDto>
{
private static GroupPairDtoComparer _instance = new();
private GroupPairDtoComparer()
{ }
public static GroupPairDtoComparer Instance => _instance;
public bool Equals(GroupPairDto? x, GroupPairDto? y)
{
if (x == null || y == null) return false;
return x.GID.Equals(y.GID, StringComparison.Ordinal) && x.UID.Equals(y.UID, StringComparison.Ordinal);
}
public int GetHashCode(GroupPairDto obj)
{
return HashCode.Combine(obj.Group.GID.GetHashCode(), obj.User.UID.GetHashCode());
}
}

View File

@@ -1,22 +0,0 @@
namespace LightlessSync.API.Data.Comparer;
public class UserDataComparer : IEqualityComparer<UserData>
{
private static UserDataComparer _instance = new();
private UserDataComparer()
{ }
public static UserDataComparer Instance => _instance;
public bool Equals(UserData? x, UserData? y)
{
if (x == null || y == null) return false;
return x.UID.Equals(y.UID, StringComparison.Ordinal);
}
public int GetHashCode(UserData obj)
{
return obj.UID.GetHashCode();
}
}

View File

@@ -1,24 +0,0 @@
using LightlessSync.API.Dto.User;
namespace LightlessSync.API.Data.Comparer;
public class UserDtoComparer : IEqualityComparer<UserDto>
{
private static UserDtoComparer _instance = new();
private UserDtoComparer()
{ }
public static UserDtoComparer Instance => _instance;
public bool Equals(UserDto? x, UserDto? y)
{
if (x == null || y == null) return false;
return x.User.UID.Equals(y.User.UID, StringComparison.Ordinal);
}
public int GetHashCode(UserDto obj)
{
return obj.User.UID.GetHashCode();
}
}

View File

@@ -1,6 +0,0 @@
namespace LightlessSync.API.Data;
public class Constants
{
public const string IndividualKeyword = "//LIGHTLESS//DIRECT";
}

View File

@@ -1,9 +0,0 @@
namespace LightlessSync.API.Data.Enum;
[Flags]
public enum GroupPairUserInfo
{
None = 0x0,
IsModerator = 0x2,
IsPinned = 0x4
}

View File

@@ -1,11 +0,0 @@
namespace LightlessSync.API.Data.Enum;
[Flags]
public enum GroupPermissions
{
NoneSet = 0x0,
PreferDisableAnimations = 0x1,
PreferDisableSounds = 0x2,
DisableInvites = 0x4,
PreferDisableVFX = 0x8,
}

View File

@@ -1,11 +0,0 @@
namespace LightlessSync.API.Data.Enum;
[Flags]
public enum GroupUserPreferredPermissions
{
NoneSet = 0x0,
Paused = 0x1,
DisableAnimations = 0x2,
DisableSounds = 0x4,
DisableVFX = 0x8,
}

View File

@@ -1,8 +0,0 @@
namespace LightlessSync.API.Data.Enum;
public enum IndividualPairStatus
{
None,
OneSided,
Bidirectional
}

View File

@@ -1,8 +0,0 @@
namespace LightlessSync.API.Data.Enum;
public enum MessageSeverity
{
Information,
Warning,
Error
}

View File

@@ -1,9 +0,0 @@
namespace LightlessSync.API.Data.Enum;
public enum ObjectKind
{
Player = 0,
MinionOrMount = 1,
Companion = 2,
Pet = 3,
}

View File

@@ -1,12 +0,0 @@
namespace LightlessSync.API.Data.Enum;
[Flags]
public enum UserPermissions
{
NoneSet = 0,
Paused = 1,
DisableAnimations = 2,
DisableSounds = 4,
DisableVFX = 8,
Sticky = 16,
}

View File

@@ -1,50 +0,0 @@
using LightlessSync.API.Data.Enum;
namespace LightlessSync.API.Data.Extensions;
public static class GroupPermissionsExtensions
{
public static bool IsDisableInvites(this GroupPermissions perm)
{
return perm.HasFlag(GroupPermissions.DisableInvites);
}
public static bool IsPreferDisableAnimations(this GroupPermissions perm)
{
return perm.HasFlag(GroupPermissions.PreferDisableAnimations);
}
public static bool IsPreferDisableSounds(this GroupPermissions perm)
{
return perm.HasFlag(GroupPermissions.PreferDisableSounds);
}
public static bool IsPreferDisableVFX(this GroupPermissions perm)
{
return perm.HasFlag(GroupPermissions.PreferDisableVFX);
}
public static void SetDisableInvites(this ref GroupPermissions perm, bool set)
{
if (set) perm |= GroupPermissions.DisableInvites;
else perm &= ~GroupPermissions.DisableInvites;
}
public static void SetPreferDisableAnimations(this ref GroupPermissions perm, bool set)
{
if (set) perm |= GroupPermissions.PreferDisableAnimations;
else perm &= ~GroupPermissions.PreferDisableAnimations;
}
public static void SetPreferDisableSounds(this ref GroupPermissions perm, bool set)
{
if (set) perm |= GroupPermissions.PreferDisableSounds;
else perm &= ~GroupPermissions.PreferDisableSounds;
}
public static void SetPreferDisableVFX(this ref GroupPermissions perm, bool set)
{
if (set) perm |= GroupPermissions.PreferDisableVFX;
else perm &= ~GroupPermissions.PreferDisableVFX;
}
}

View File

@@ -1,28 +0,0 @@
using LightlessSync.API.Data.Enum;
namespace LightlessSync.API.Data.Extensions;
public static class GroupUserInfoExtensions
{
public static bool IsModerator(this GroupPairUserInfo info)
{
return info.HasFlag(GroupPairUserInfo.IsModerator);
}
public static bool IsPinned(this GroupPairUserInfo info)
{
return info.HasFlag(GroupPairUserInfo.IsPinned);
}
public static void SetModerator(this ref GroupPairUserInfo info, bool isModerator)
{
if (isModerator) info |= GroupPairUserInfo.IsModerator;
else info &= ~GroupPairUserInfo.IsModerator;
}
public static void SetPinned(this ref GroupPairUserInfo info, bool isPinned)
{
if (isPinned) info |= GroupPairUserInfo.IsPinned;
else info &= ~GroupPairUserInfo.IsPinned;
}
}

View File

@@ -1,50 +0,0 @@
using LightlessSync.API.Data.Enum;
namespace LightlessSync.API.Data.Extensions;
public static class GroupUserPermissionsExtensions
{
public static bool IsDisableAnimations(this GroupUserPreferredPermissions perm)
{
return perm.HasFlag(GroupUserPreferredPermissions.DisableAnimations);
}
public static bool IsDisableSounds(this GroupUserPreferredPermissions perm)
{
return perm.HasFlag(GroupUserPreferredPermissions.DisableSounds);
}
public static bool IsDisableVFX(this GroupUserPreferredPermissions perm)
{
return perm.HasFlag(GroupUserPreferredPermissions.DisableVFX);
}
public static bool IsPaused(this GroupUserPreferredPermissions perm)
{
return perm.HasFlag(GroupUserPreferredPermissions.Paused);
}
public static void SetDisableAnimations(this ref GroupUserPreferredPermissions perm, bool set)
{
if (set) perm |= GroupUserPreferredPermissions.DisableAnimations;
else perm &= ~GroupUserPreferredPermissions.DisableAnimations;
}
public static void SetDisableSounds(this ref GroupUserPreferredPermissions perm, bool set)
{
if (set) perm |= GroupUserPreferredPermissions.DisableSounds;
else perm &= ~GroupUserPreferredPermissions.DisableSounds;
}
public static void SetDisableVFX(this ref GroupUserPreferredPermissions perm, bool set)
{
if (set) perm |= GroupUserPreferredPermissions.DisableVFX;
else perm &= ~GroupUserPreferredPermissions.DisableVFX;
}
public static void SetPaused(this ref GroupUserPreferredPermissions perm, bool set)
{
if (set) perm |= GroupUserPreferredPermissions.Paused;
else perm &= ~GroupUserPreferredPermissions.Paused;
}
}

View File

@@ -1,61 +0,0 @@
using LightlessSync.API.Data.Enum;
namespace LightlessSync.API.Data.Extensions;
public static class UserPermissionsExtensions
{
public static bool IsDisableAnimations(this UserPermissions perm)
{
return perm.HasFlag(UserPermissions.DisableAnimations);
}
public static bool IsDisableSounds(this UserPermissions perm)
{
return perm.HasFlag(UserPermissions.DisableSounds);
}
public static bool IsDisableVFX(this UserPermissions perm)
{
return perm.HasFlag(UserPermissions.DisableVFX);
}
public static bool IsPaused(this UserPermissions perm)
{
return perm.HasFlag(UserPermissions.Paused);
}
public static bool IsSticky(this UserPermissions perm)
{
return perm.HasFlag(UserPermissions.Sticky);
}
public static void SetDisableAnimations(this ref UserPermissions perm, bool set)
{
if (set) perm |= UserPermissions.DisableAnimations;
else perm &= ~UserPermissions.DisableAnimations;
}
public static void SetDisableSounds(this ref UserPermissions perm, bool set)
{
if (set) perm |= UserPermissions.DisableSounds;
else perm &= ~UserPermissions.DisableSounds;
}
public static void SetDisableVFX(this ref UserPermissions perm, bool set)
{
if (set) perm |= UserPermissions.DisableVFX;
else perm &= ~UserPermissions.DisableVFX;
}
public static void SetPaused(this ref UserPermissions perm, bool paused)
{
if (paused) perm |= UserPermissions.Paused;
else perm &= ~UserPermissions.Paused;
}
public static void SetSticky(this ref UserPermissions perm, bool sticky)
{
if (sticky) perm |= UserPermissions.Sticky;
else perm &= ~UserPermissions.Sticky;
}
}

View File

@@ -1,29 +0,0 @@
using MessagePack;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
namespace LightlessSync.API.Data;
[MessagePackObject(keyAsPropertyName: true)]
public class FileReplacementData
{
public FileReplacementData()
{
DataHash = new(() =>
{
var json = JsonSerializer.Serialize(this);
#pragma warning disable SYSLIB0021 // Type or member is obsolete
using SHA256CryptoServiceProvider cryptoProvider = new();
#pragma warning restore SYSLIB0021 // Type or member is obsolete
return BitConverter.ToString(cryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(json))).Replace("-", "", StringComparison.Ordinal);
});
}
[JsonIgnore]
public Lazy<string> DataHash { get; }
public string FileSwapPath { get; set; } = string.Empty;
public string[] GamePaths { get; set; } = Array.Empty<string>();
public string Hash { get; set; } = string.Empty;
}

View File

@@ -1,10 +0,0 @@
using MessagePack;
namespace LightlessSync.API.Data;
[MessagePackObject(keyAsPropertyName: true)]
public record GroupData(string GID, string? Alias = null)
{
[IgnoreMember]
public string AliasOrGID => string.IsNullOrWhiteSpace(Alias) ? GID : Alias;
}

View File

@@ -1,10 +0,0 @@
using MessagePack;
namespace LightlessSync.API.Data;
[MessagePackObject(keyAsPropertyName: true)]
public record UserData(string UID, string? Alias = null)
{
[IgnoreMember]
public string AliasOrUID => string.IsNullOrWhiteSpace(Alias) ? UID : Alias;
}

View File

@@ -1,9 +0,0 @@
namespace LightlessSync.API.Dto.CharaData;
public enum AccessTypeDto
{
Individuals,
ClosePairs,
AllPairs,
Public
}

View File

@@ -1,14 +0,0 @@
using LightlessSync.API.Data;
using MessagePack;
namespace LightlessSync.API.Dto.CharaData;
[MessagePackObject(keyAsPropertyName: true)]
public record CharaDataDownloadDto(string Id, UserData Uploader) : CharaDataDto(Id, Uploader)
{
public string GlamourerData { get; init; } = string.Empty;
public string CustomizeData { get; init; } = string.Empty;
public string ManipulationData { get; set; } = string.Empty;
public List<GamePathEntry> FileGamePaths { get; init; } = [];
public List<GamePathEntry> FileSwaps { get; init; } = [];
}

View File

@@ -1,9 +0,0 @@
using LightlessSync.API.Data;
namespace LightlessSync.API.Dto.CharaData;
public record CharaDataDto(string Id, UserData Uploader)
{
public string Description { get; init; } = string.Empty;
public DateTime UpdatedDate { get; init; }
}

View File

@@ -1,88 +0,0 @@
using LightlessSync.API.Data;
using MessagePack;
namespace LightlessSync.API.Dto.CharaData;
[MessagePackObject(keyAsPropertyName: true)]
public record CharaDataFullDto(string Id, UserData Uploader) : CharaDataDto(Id, Uploader)
{
public DateTime CreatedDate { get; init; }
public DateTime ExpiryDate { get; set; }
public string GlamourerData { get; set; } = string.Empty;
public string CustomizeData { get; set; } = string.Empty;
public string ManipulationData { get; set; } = string.Empty;
public int DownloadCount { get; set; } = 0;
public List<UserData> AllowedUsers { get; set; } = [];
public List<GroupData> AllowedGroups { get; set; } = [];
public List<GamePathEntry> FileGamePaths { get; set; } = [];
public List<GamePathEntry> FileSwaps { get; set; } = [];
public List<GamePathEntry> OriginalFiles { get; set; } = [];
public AccessTypeDto AccessType { get; set; }
public ShareTypeDto ShareType { get; set; }
public List<PoseEntry> PoseData { get; set; } = [];
}
[MessagePackObject(keyAsPropertyName: true)]
public record GamePathEntry(string HashOrFileSwap, string GamePath);
[MessagePackObject(keyAsPropertyName: true)]
public record PoseEntry(long? Id)
{
public string? Description { get; set; } = string.Empty;
public string? PoseData { get; set; } = string.Empty;
public WorldData? WorldData { get; set; }
}
[MessagePackObject]
public record struct WorldData
{
[Key(0)] public LocationInfo LocationInfo { get; set; }
[Key(1)] public float PositionX { get; set; }
[Key(2)] public float PositionY { get; set; }
[Key(3)] public float PositionZ { get; set; }
[Key(4)] public float RotationX { get; set; }
[Key(5)] public float RotationY { get; set; }
[Key(6)] public float RotationZ { get; set; }
[Key(7)] public float RotationW { get; set; }
[Key(8)] public float ScaleX { get; set; }
[Key(9)] public float ScaleY { get; set; }
[Key(10)] public float ScaleZ { get; set; }
}
[MessagePackObject]
public record struct LocationInfo
{
[Key(0)] public uint ServerId { get; set; }
[Key(1)] public uint MapId { get; set; }
[Key(2)] public uint TerritoryId { get; set; }
[Key(3)] public uint DivisionId { get; set; }
[Key(4)] public uint WardId { get; set; }
[Key(5)] public uint HouseId { get; set; }
[Key(6)] public uint RoomId { get; set; }
}
[MessagePackObject]
public record struct PoseData
{
[Key(0)] public bool IsDelta { get; set; }
[Key(1)] public Dictionary<string, BoneData> Bones { get; set; }
[Key(2)] public Dictionary<string, BoneData> MainHand { get; set; }
[Key(3)] public Dictionary<string, BoneData> OffHand { get; set; }
[Key(4)] public BoneData ModelDifference { get; set; }
}
[MessagePackObject]
public record struct BoneData
{
[Key(0)] public bool Exists { get; set; }
[Key(1)] public float PositionX { get; set; }
[Key(2)] public float PositionY { get; set; }
[Key(3)] public float PositionZ { get; set; }
[Key(4)] public float RotationX { get; set; }
[Key(5)] public float RotationY { get; set; }
[Key(6)] public float RotationZ { get; set; }
[Key(7)] public float RotationW { get; set; }
[Key(8)] public float ScaleX { get; set; }
[Key(9)] public float ScaleY { get; set; }
[Key(10)] public float ScaleZ { get; set; }
}

View File

@@ -1,11 +0,0 @@
using LightlessSync.API.Data;
using MessagePack;
namespace LightlessSync.API.Dto.CharaData;
[MessagePackObject(keyAsPropertyName: true)]
public record CharaDataMetaInfoDto(string Id, UserData Uploader) : CharaDataDto(Id, Uploader)
{
public bool CanBeDownloaded { get; init; }
public List<PoseEntry> PoseData { get; set; } = [];
}

View File

@@ -1,20 +0,0 @@
using MessagePack;
namespace LightlessSync.API.Dto.CharaData;
[MessagePackObject(keyAsPropertyName: true)]
public record CharaDataUpdateDto(string Id)
{
public string? Description { get; set; }
public DateTime? ExpiryDate { get; set; }
public string? GlamourerData { get; set; }
public string? CustomizeData { get; set; }
public string? ManipulationData { get; set; }
public List<string>? AllowedUsers { get; set; }
public List<string>? AllowedGroups { get; set; }
public List<GamePathEntry>? FileGamePaths { get; set; }
public List<GamePathEntry>? FileSwaps { get; set; }
public AccessTypeDto? AccessType { get; set; }
public ShareTypeDto? ShareType { get; set; }
public List<PoseEntry>? Poses { get; set; }
}

View File

@@ -1,7 +0,0 @@
namespace LightlessSync.API.Dto.CharaData;
public enum ShareTypeDto
{
Private,
Shared
}

View File

@@ -1,27 +0,0 @@
using LightlessSync.API.Data;
using MessagePack;
namespace LightlessSync.API.Dto;
[MessagePackObject(keyAsPropertyName: true)]
public record ConnectionDto(UserData User)
{
public Version CurrentClientVersion { get; set; } = new(0, 0, 0);
public int ServerVersion { get; set; }
public bool IsAdmin { get; set; }
public bool IsModerator { get; set; }
public ServerInfo ServerInfo { get; set; } = new();
public DefaultPermissionsDto DefaultPreferredPermissions { get; set; } = new();
}
[MessagePackObject(keyAsPropertyName: true)]
public record ServerInfo
{
public string ShardName { get; set; } = string.Empty;
public int MaxGroupUserCount { get; set; }
public int MaxGroupsCreatedByUser { get; set; }
public int MaxGroupsJoinedByUser { get; set; }
public Uri FileServerAddress { get; set; } = new Uri("http://nonemptyuri");
public int MaxCharaData { get; set; }
public int MaxCharaDataVanity { get; set; }
}

View File

@@ -1,15 +0,0 @@
using MessagePack;
namespace LightlessSync.API.Dto;
[MessagePackObject(keyAsPropertyName: true)]
public record DefaultPermissionsDto
{
public bool DisableIndividualAnimations { get; set; } = false;
public bool DisableIndividualSounds { get; set; } = false;
public bool DisableIndividualVFX { get; set; } = false;
public bool DisableGroupAnimations { get; set; } = false;
public bool DisableGroupSounds { get; set; } = false;
public bool DisableGroupVFX { get; set; } = false;
public bool IndividualIsSticky { get; set; } = true;
}

View File

@@ -1,15 +0,0 @@
using MessagePack;
namespace LightlessSync.API.Dto.Files;
[MessagePackObject(keyAsPropertyName: true)]
public record DownloadFileDto : ITransferFileDto
{
public bool FileExists { get; set; } = true;
public string Hash { get; set; } = string.Empty;
public string Url { get; set; } = string.Empty;
public long Size { get; set; } = 0;
public bool IsForbidden { get; set; } = false;
public string ForbiddenBy { get; set; } = string.Empty;
public long RawSize { get; set; } = 0;
}

View File

@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LightlessSync.API.Dto.Files;
public class FilesSendDto
{
public List<string> FileHashes { get; set; } = new();
public List<string> UIDs { get; set; } = new();
}

View File

@@ -1,8 +0,0 @@
namespace LightlessSync.API.Dto.Files;
public interface ITransferFileDto
{
string ForbiddenBy { get; set; }
string Hash { get; set; }
bool IsForbidden { get; set; }
}

View File

@@ -1,11 +0,0 @@
using MessagePack;
namespace LightlessSync.API.Dto.Files;
[MessagePackObject(keyAsPropertyName: true)]
public record UploadFileDto : ITransferFileDto
{
public string Hash { get; set; } = string.Empty;
public bool IsForbidden { get; set; } = false;
public string ForbiddenBy { get; set; } = string.Empty;
}

View File

@@ -1,19 +0,0 @@
using LightlessSync.API.Data;
using MessagePack;
namespace LightlessSync.API.Dto.Group;
[MessagePackObject(keyAsPropertyName: true)]
public record BannedGroupUserDto : GroupPairDto
{
public BannedGroupUserDto(GroupData group, UserData user, string reason, DateTime bannedOn, string bannedBy) : base(group, user)
{
Reason = reason;
BannedOn = bannedOn;
BannedBy = bannedBy;
}
public string Reason { get; set; }
public DateTime BannedOn { get; set; }
public string BannedBy { get; set; }
}

View File

@@ -1,13 +0,0 @@
using LightlessSync.API.Data;
using MessagePack;
namespace LightlessSync.API.Dto.Group;
[MessagePackObject(keyAsPropertyName: true)]
public record GroupDto(GroupData Group)
{
public GroupData Group { get; set; } = Group;
public string GID => Group.GID;
public string? GroupAlias => Group.Alias;
public string GroupAliasOrGID => Group.AliasOrGID;
}

View File

@@ -1,14 +0,0 @@
using LightlessSync.API.Data;
using LightlessSync.API.Data.Enum;
using MessagePack;
namespace LightlessSync.API.Dto.Group;
[MessagePackObject(keyAsPropertyName: true)]
public record GroupFullInfoDto(GroupData Group, UserData Owner, GroupPermissions GroupPermissions,
GroupUserPreferredPermissions GroupUserPermissions, GroupPairUserInfo GroupUserInfo,
Dictionary<string, GroupPairUserInfo> GroupPairUserInfos) : GroupInfoDto(Group, Owner, GroupPermissions)
{
public GroupUserPreferredPermissions GroupUserPermissions { get; set; } = GroupUserPermissions;
public GroupPairUserInfo GroupUserInfo { get; set; } = GroupUserInfo;
}

View File

@@ -1,18 +0,0 @@
using LightlessSync.API.Data;
using LightlessSync.API.Data.Enum;
using MessagePack;
namespace LightlessSync.API.Dto.Group;
[MessagePackObject(keyAsPropertyName: true)]
public record GroupInfoDto(GroupData Group, UserData Owner, GroupPermissions GroupPermissions) : GroupDto(Group)
{
public GroupPermissions GroupPermissions { get; set; } = GroupPermissions;
public UserData Owner { get; set; } = Owner;
public string OwnerUID => Owner.UID;
public string? OwnerAlias => Owner.Alias;
public string OwnerAliasOrUID => Owner.AliasOrUID;
}
public record GroupJoinInfoDto(GroupData Group, UserData Owner, GroupPermissions GroupPermissions, bool Success) : GroupInfoDto(Group, Owner, GroupPermissions);

View File

@@ -1,11 +0,0 @@
using LightlessSync.API.Data;
using LightlessSync.API.Data.Enum;
using MessagePack;
namespace LightlessSync.API.Dto.Group;
[MessagePackObject(keyAsPropertyName: true)]
public record GroupPasswordDto(GroupData Group, string Password) : GroupDto(Group);
[MessagePackObject(keyAsPropertyName: true)]
public record GroupJoinDto(GroupData Group, string Password, GroupUserPreferredPermissions GroupUserPreferredPermissions) : GroupPasswordDto(Group, Password);

View File

@@ -1,12 +0,0 @@
using LightlessSync.API.Data;
using MessagePack;
namespace LightlessSync.API.Dto.Group;
[MessagePackObject(keyAsPropertyName: true)]
public record GroupPairDto(GroupData Group, UserData User) : GroupDto(Group)
{
public string UID => User.UID;
public string? UserAlias => User.Alias;
public string UserAliasOrUID => User.AliasOrUID;
}

View File

@@ -1,8 +0,0 @@
using LightlessSync.API.Data;
using LightlessSync.API.Data.Enum;
using MessagePack;
namespace LightlessSync.API.Dto.Group;
[MessagePackObject(keyAsPropertyName: true)]
public record GroupPairFullInfoDto(GroupData Group, UserData User, UserPermissions SelfToOtherPermissions, UserPermissions OtherToSelfPermissions) : GroupPairDto(Group, User);

Some files were not shown because too many files have changed in this diff Show More