Skip to content

Releases: no-src/gofs

v0.5.1

15 Dec 03:35
Compare
Choose a tag to compare

Fixed

  • Wait for the http server to start successfully in one second, and add some error logs.

Enhancements

  • Add the command package to support executing a series of commands by a config file that defines some instructions.
  • Add some integration tests.
  • Ensure all the code in the runWithConfig function is executed.
  • Replace the WaitDone with Done to limit the behavior of the caller.
  • Support shutdown by caller, wait initial finished and wait for program exit.
  • Add the NotifySignal type, sends a signal with timeout.
  • Update the signal.Notify function, support send a signal to trigger shutdown by user.
  • Add the test-coverage.sh script.
  • Add the NewHash function to support return the hash implementation by the specified hash algorithm, and update the HashFromFile, HashFromFileName, Hash, HashFromString functions to support custom hash algorithm.
  • Add the cmd.RunWithConfigFile function.
  • Code refactoring, extract the interface Done.
  • Code refactoring, use the Option to pass parameter when creates the instance of Monitor.
  • Update README docs, add the usages of the session_mode and session_connection flags.
  • Update README docs, add the progress, encryption and decryption sections.
  • Update run-gofs-docker-local-disk-with-decrypt.sh script, remove unnecessary parameters.
  • Update dependency, github.com/minio/minio-go/v7 v7.0.42 => v7.0.44.
  • Update dependency, github.com/no-src/log v0.1.8 => v0.1.9.
  • Update dependency, github.com/schollz/progressbar/v3 v3.12.1 => v3.12.2.

v0.5.0

17 Nov 04:09
62101eb
Compare
Choose a tag to compare

Fixed

  • Fix renames a dir will not trigger the Write event on some Windows environments.
  • When remove or rename a file, remove the invalid file info.
  • If the file exists in MinIO server, don't create the empty file.
  • If login success, don't print the real password to the log.
  • Fix use of insecure HostKeyCallback implementation by adding the ssh_key flag.
  • Fix adding a nil cookie to request will cause panic.
  • Fix the data race in the Conn.
  • Fix the data race of the closed in the tcpServer.

Enhancements

  • Add the fs.IsSub function and tests.
  • Add the encrypt, encrypt_path, encrypt_secret, decrypt, decrypt_path, decrypt_secret and decrypt_out flags to support encrypt and decrypt.
  • Add the progress flag to support print the sync progress.
  • Add the sync_workers flag to set the number of file sync workers.
  • Add the log_split_date flag to support split log file by date and update README docs.
  • Code refactoring, extracts errNilTranConn error and rename the errNilConn to errNilNetConn.
  • Code refactoring, replace the type embedding with field combination in the tran.Conn.
  • Code refactoring, use the Option to pass parameter when creates the instance of Sync.
  • Rename the minIOClient to minIODriver, and replace the type embedding with field combination in the minIODriver.
  • Rename the sftpClient to sftpDriver, and replace the type embedding with field combination in the sftpDriver.
  • Update the examples about MinIO, add the secure parameter with the default value.
  • If the current path's parent directory is in the writeMap, then ignore the current path.
  • Reduce push the files that are not modified to server.
  • Add some tests for the util/httputil package.
  • Add some tests for the tran package.
  • Update dependency, github.com/schollz/progressbar/v3 v3.11.0 => v3.12.1.
  • Update dependency, github.com/minio/minio-go/v7 v7.0.37 => v7.0.42.
  • Update dependency, github.com/fsnotify/fsnotify v1.5.4 => v1.6.0.
  • Update dependency, github.com/no-src/log v0.1.7 => v0.1.8.
  • Create codeql.yml.
  • Remove the chat badge.

v0.4.4

26 Sep 01:19
Compare
Choose a tag to compare

Fixed

  • Fix vulnerability GO-2022-0969.
  • Fix the random seed is not be reset.
  • Fix compile error, syscall.Timespec's members are int32 on linux 386.
  • Fix start file server failed may lose some error log.

Enhancements

  • Add support golang 1.19.
  • Add support to pull the files from the MinIO server or push the changed files to the MinIO server.
  • Add the commit, current_time, start_time and up_time fields for report api.
  • Mask the session connection of report api.
  • Add support to specified the redis session secret in the redis connection string.
  • Add support to pull the files from the sftp server.
  • Update README docs, add the SFTP Client section.
  • Add the SFTP client example scripts for docker.
  • Update the Driver interface, add the Write function and update the Create function.
  • Add DriverName function to the Driver interface.
  • Rename the struct sftpClientSync to sftpPushClientSync.
  • Code refactoring, extract driverPullClientMonitor, driverPullClientSync and driverPushClientSync structures.
  • Add the Time.Sub function and test.
  • Code refactoring, replace chan bool with chan struct{} type if only to receive notification and don't care about the received value.
  • Move the function fs.GetFileTime to fs/fs.go and add some function prototype.
  • Remove the GinHandler interface and update the dependencies.
  • Replace ioutil.ReadAll with io.ReadAll.
  • Update dependency, github.com/gin-contrib/pprof v1.3.0 => v1.4.0.
  • Update dependency, github.com/gin-contrib/gzip v0.0.5 => v0.0.6.
  • Update dependency, github.com/no-src/log v0.1.4 => v0.1.7.
  • Update dependency, github.com/minio/minio-go/v7 v7.0.34 => v7.0.37.
  • Update dependency, golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e => v0.0.0-20220722155217-630584e8d5aa.

v0.4.3

04 Jul 16:47
Compare
Choose a tag to compare

Fixed

  • Fix when create a directory that matches the ignore rule, then its subdirectory's file that does not match the ignore rule will miss synchronize.

Enhancements

  • Add support to sync the changed file to the sftp server.
  • Add support to browse files from sftp server by http.
  • Use the retry_* flags to control sftp reconnect rule.
  • Update Dockerfile, set environment CGO_ENABLED=0 to disable dynamically linked for run in Docker.
  • Remove the -tags netgo compile argument in the build-release.sh script for release.
  • Add support [filepath] and [regexp] switches to control the ignore file rule provider, default is [filepath].
  • Support imports the gofs as an importable package.
  • Add the RunWithArgs function, running the gofs program with specified command-line arguments, starting with the program name.
  • Add the VFS.Addr function to return the server address.
  • Export the fs.toDeletedPath function.
  • Skip the access log of /favicon.ico path.
  • Add the log_format flag to set the log output format, current support text and json, default is text.
  • Update dependency and fix incompatible code, github.com/no-src/log v0.1.3 => v0.1.4.
  • Update dependency, github.com/gin-gonic/gin v1.8.0 => v1.8.1.
  • Update build-docker.sh script, remove the image with specified tag and remove dangling images after build success.

v0.4.2

05 Jun 14:45
Compare
Choose a tag to compare

Fixed

  • Fix the program not exiting correctly when the file web server fails to start.

Enhancements

  • Add the tls_insecure_skip_verify flag to control whether a client verifies the server's certificate chain and host name.
  • Add the httputil.NewTLSConfig function to reduce repeat code.
  • Update docker example scripts, add the WORKDIR environment variable and use the GOFS_SERVER_ADDR environment variable as the host of the generate cert.
  • Add the session_mode and session_connection flags to support switching session store mode, currently supports memory[1] and redis[2], default is memory[1].
  • Add the Run function and keep the main function clean.
  • Add more optional hash algorithms, and add the checksum_algorithm flag to set the default hash algorithm.
  • Update README docs, add relay section.
  • Update dependency, github.com/gin-gonic/gin v1.7.7 => v1.8.0.
  • Add docker image repository address for the about flag.

v0.4.1

12 May 15:41
Compare
Choose a tag to compare

Enhancements

  • Add the Docker support and some docker example scripts.
  • Add build-release.sh script to build release file for the linux and windows system.
  • Add support using the v flag print go version info.
  • Add sync_delay flag, sync_delay_events and sync_delay_time flags to support sync delay and update README docs.
  • Add the log_sample_rate flag to set the sample rate for the sample logger, and the value ranges from 0 to 1, default is 1.
  • Add the force_checksum flag, if the file size and file modification time of the source file is equal to the destination file and force_checksum is false, then ignore the current file transfer.
  • Add dependabot.yml.
  • Update github action,codecov/codecov-action 2 => 3.
  • Update github action,actions/setup-go 2 => 3.
  • Update github action,actions/checkout 2 => 3.
  • Update dependency, github.com/no-src/log v0.1.2 => v0.1.3.
  • Update dependency, github.com/fsnotify/fsnotify v1.5.1 => v1.5.4.
  • Update dependency, github.com/gin-contrib/sessions v0.0.4 => v0.0.5.
  • Code refactoring for tests.

v0.4.0

19 Apr 16:54
Compare
Choose a tag to compare

Enhancements

  • Changed minimum supported version to go1.18, removed the go1.17 support.
  • Add the report flag to support enable the report api route and start to collect the report data, need enable manage flag first.
  • Update interface{} type to any.
  • Add the TopList struct and tests, store some elements in list with specified capacity, the oldest elements that exceed specified capacity will be discarded.
  • Add the Time struct and tests in the util/timeutil package.
  • Export the event struct and its fields, and add a Time field for it.
  • Add benchmark tests for the hashutil package and move the TestHashValues test to hash_value_test.go.
  • Add the checkpoint_count flag to use the file checkpoint to reduce transfer unmodified file chunks and update the README doc for it.
  • Add the need_checkpoint parameter to the file query api support to return file checkpoint hash value and update server/README.md doc for it.
  • Update dependency, github.com/no-src/log v0.1.1 => v0.1.2.
  • Remove unused function httputil.HttpPostFileWithCookie.
  • Remove the no_server tags and no longer support to remove file server.
  • Add the hashutil.CheckpointsMD5FromFileName function and tests, calculate the hash value of the full file and first chunk and some checkpoints.
  • Add the hashutil.CompareHashValuesWithFileName function and tests, calculate the file hashes and return the last continuous hit HashValue.
  • Add the checksum flag to calculate and print the checksum for source file.

v0.3.4

23 Mar 18:18
Compare
Choose a tag to compare

Fixed

  • Fix cyclomatic complexity is too high.

Enhancements

  • Add support go1.18.
  • Support send a request that compares the hash value of the file chunk before writing the file chunk to the remote push server.
  • Add the MD5FromFileChunk function to calculate the hash value of the file chunk and add some tests for it.
  • Add the IsEOF and IsNonEOF functions, and add some tests for them.
  • Move util/*.go to the *util package and add some tests for this package.
  • Remove the +build instruction.
  • Remove the vfsValue.Get function.
  • Remove break in the switch.
  • Rename the MD5 function to MD5FromString.
  • Add some tests.
  • Use the mock function for disk operation in the fs package tests.
  • Update server/README.md, fix table format and update file push api document.

v0.3.3

11 Mar 07:10
Compare
Choose a tag to compare

Fixed

  • Fix the EventLog write to a nil Writer will cause panic.
  • Fix the DoWithContext function will return a nil value when panic occurs.
  • Fix call the Done or DoneWithError for more than once will be deadlock.
  • Fix the golint warning.

Enhancements

  • Rename the pprof flag to manage.
  • Rename the pprof_private flag to manage_private.
  • Reduce upload and write the same file to the remote push server.
  • Add the conf flag to load config from the file to replace the flags, support yaml and json format currently.
  • Add the core.Duration struct to replace the time.Duration and custom the encoding behavior.
  • Add config api to read program config with json or yaml format.
  • Add the awesome badge.
  • Set the test timeout for 10 minutes.
  • Add some tests.
  • Update README docs, add the run in docker section, add usage for -chunk_size flag, and how to use the configuration file section.
  • Update server/README.md, add document for file push api.

v0.3.2

01 Mar 09:02
Compare
Choose a tag to compare

Fixed

  • Fix the cyclomatic complexity is too high.
  • Fix creates too many simultaneously alive goroutines and they are exceeded.
  • Fix writing an empty file has no effect in the remote disk mode and the push mode.
  • Fix writing an empty file or a same length file has no effect in the local disk mode.

Enhancements

  • Add the chunk_size flag to support upload the big file by chunk.