Skip to content

Commit

Permalink
Updates v1.123
Browse files Browse the repository at this point in the history
- Fixed nil pointer bug when delete file during storage quota is updating
- Fixed force delete lag bug when deleting a lot of large files
- Fixed File Manager upload counter and waiting counter bug
- Fixed Music App cannot playback filename with hashtag bug
- Fixed FTP bug in loading in virtual file system handler
- Fixed large file scanner bug
- Fixed File Manager cannot open file with two dot bug
- Fixed Basic backup cache file bug
- Fixed shortcut app selector bug
- Fixed AGI file glob and aglob showing hidden file bug
- Fixed file operation complete checkmark not shown bug
- Fixed desktop clone file bug
- Fixed NotepadA load json bug
- Fixed file operation dialog bug
- Fixed HDSv2 execute URL escape bug
- Fixed WebApp reload on non-admin account bug
- Fixed Linux netstat bug
- Added Screen Capture function
- Added Ctrl + C shortcut for desktop file copy
- Added experimental upload mode for uploading huge file
- Added thumbnail in Music WebApp song list
- Added shortcut on Mobile Desktop Interface
- Added GET paramter and hash passthrough in login redirection interface
- Added File Manager "unzip here" feature
- Added localization to shortcut creation interface
- Added desktop admin icon after username
- Added desktop Ctrl+C and Ctrl+V support
- Added file versioning system
- Added Makefile
- Added Expotential login retry time
- Added no-title placeholder for MangaCafe
- Added enable overview in non-cloud mode
- Added auto tar.gz unzip logic during startup
- Added netstat support for MacOS (By jk)
- Optimized group unzip logic
- Optimized code in file operation dialog
- Optimized LDAP logic (By Alanyeung)
- Migrated all high abstraction code base to use common module
- Moved all trash, cache and versioning file to .metadata folder
  • Loading branch information
tobychui committed Jun 25, 2022
1 parent 4c6d976 commit c385fdd
Show file tree
Hide file tree
Showing 396 changed files with 28,992 additions and 282,741 deletions.
3 changes: 3 additions & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fsdb/*
system/network/wifi/ap/*
system/storage.json
system/dev.uuid
system/smtp_conf.json
system/storage.json
system/bridge.json
system/storage/*.json
Expand All @@ -52,6 +53,7 @@ subservice/*

#Binary related
build/*
dist/*
aroz_online.exe
aroz_online
arozos.exe
Expand All @@ -65,3 +67,4 @@ start.sh.backup
*.backup
system/bridge.json
launcher.exe
web.tar.gz
68 changes: 68 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# PLATFORMS := darwin/amd64 darwin/arm64 freebsd/amd64 linux/386 linux/amd64 linux/arm linux/arm64 linux/mipsle windows/386 windows/amd64 windows/arm windows/arm64
PLATFORMS := darwin/amd64 darwin/arm64 linux/amd64 linux/arm linux/arm64 linux/mipsle windows/amd64 windows/arm64
temp = $(subst /, ,$@)
os = $(word 1, $(temp))
arch = $(word 2, $(temp))

all: web.tar.gz $(PLATFORMS) fixwindows arozos_file_checksum.sha1

binary: $(PLATFORMS)

hash: arozos_file_checksum.sha1

web: web.tar.gz

clean:
rm -f arozos_*_*
rm -f web.tar.gz

$(PLATFORMS):
@echo "Building $(os)/$(arch)"
GOROOT_FINAL=Git/ GOOS=$(os) GOARCH=$(arch) go build -o './dist/arozos_$(os)_$(arch)' -ldflags "-s -w" -trimpath

fixwindows:
-mv ./dist/arozos_windows_amd64 ./dist/arozos_windows_amd64.exe
-mv ./dist/arozos_windows_arm64 ./dist/arozos_windows_arm64.exe

web.tar.gz:

@echo "Removing old build resources, if exists"
-rm -rf ./dist/
-mkdir ./dist/

@echo "Moving subfolders to build folder"
-cp -r ./web ./dist/web/
# cp -r ./subservice ./dist/subservice/
-cp -r ./system ./dist/system/

@ echo "Remove sensitive information"
-rm ./dist/system/dev.uuid
-rm ./dist/system/ao.db
-rm ./dist/system/smtp_conf.json
-rm ./dist/system/storage.json
# -mv ./dist/system/storage.json ./dist/system/storage.json.example
-rm -rf ./dist/system/aecron/
-rm ./dist/system/cron.json
-rm ./dist/system/bridge.json
-rm ./dist/system/auth/authlog.db

@ echo "Remove ip2country, todo: Add binary base searching for this function"
-rm -rf "./dist/system/ip2country"

@ echo "Remove modules that should not go into the build folder"
-rm -rf "./dist/web/Cyinput"
-rm -rf "./dist/web/Label Maker"
-rm -rf "./dist/web/Dummy"


@echo "Creating tarball for all required files"
-rm ./dist/web.tar.gz
-cd ./dist/ && tar -czf ./web.tar.gz system/ web/

@echo "Clearing up unzipped folder structures"
-rm -rf "./dist/web"
-rm -rf "./dist/system"

arozos_file_checksum.sha1:
@echo "Generating the checksum, if sha1sum installed"
-sha1sum ./dist/arozos_*_* web.tar.gz > ./dist/arozos_file_checksum.sha1
3 changes: 2 additions & 1 deletion src/agi.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"net/http"

agi "imuslab.com/arozos/mod/agi"
"imuslab.com/arozos/mod/common"
)

var (
Expand Down Expand Up @@ -44,7 +45,7 @@ func AGIInit() {
//Register external API request handler endpoint
http.HandleFunc("/api/ajgi/interface", func(w http.ResponseWriter, r *http.Request) {
//Check if token exists
token, err := mv(r, "token", true)
token, err := common.Mv(r, "token", true)
if err != nil {
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("401 - Unauthorized (token is empty)"))
Expand Down
26 changes: 14 additions & 12 deletions src/apt.go
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
package main

import (
"net/http"
"log"
prout "imuslab.com/arozos/mod/prouter"
"net/http"

apt "imuslab.com/arozos/mod/apt"
"imuslab.com/arozos/mod/common"
prout "imuslab.com/arozos/mod/prouter"
)

func PackagManagerInit(){
func PackagManagerInit() {
//Create a package manager
packageManager = apt.NewPackageManager(*allow_package_autoInstall);
packageManager = apt.NewPackageManager(*allow_package_autoInstall)
log.Println("Package Manager Initiated")

//Create a System Setting handler
//Create a System Setting handler
//aka who can access System Setting can see contents about packages
router := prout.NewModuleRouter(prout.RouterOption{
ModuleName: "System Setting",
AdminOnly: false,
UserHandler: userHandler,
DeniedHandler: func(w http.ResponseWriter, r *http.Request){
sendErrorResponse(w, "Permission Denied");
ModuleName: "System Setting",
AdminOnly: false,
UserHandler: userHandler,
DeniedHandler: func(w http.ResponseWriter, r *http.Request) {
common.SendErrorResponse(w, "Permission Denied")
},
});
})

//Handle package listing request
router.HandleFunc("/system/apt/list", apt.HandlePackageListRequest)

Expand Down
5 changes: 3 additions & 2 deletions src/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func AuthInit() {
http.HandleFunc("/api/auth/login", authAgent.HandleAutologinTokenLogin)

authAgent.LoadAutologinTokenFromDB()

}

func AuthSettingsInit() {
Expand All @@ -62,7 +61,7 @@ func AuthSettingsInit() {
AdminOnly: true,
UserHandler: userHandler,
DeniedHandler: func(w http.ResponseWriter, r *http.Request) {
sendErrorResponse(w, "Permission Denied")
common.SendErrorResponse(w, "Permission Denied")
},
})

Expand Down Expand Up @@ -105,4 +104,6 @@ func AuthSettingsInit() {
adminRouter.HandleFunc("/system/auth/blacklist/ban", authAgent.BlacklistManager.HandleAddBannedIP)
adminRouter.HandleFunc("/system/auth/blacklist/unban", authAgent.BlacklistManager.HandleRemoveBannedIP)

//Register nightly task for clearup all user retry counter
nightlyManager.RegisterNightlyTask(authAgent.ExpDelayHandler.ResetAllUserRetryCounter)
}
Loading

0 comments on commit c385fdd

Please sign in to comment.