All Projects → bigfile → Bigfile

bigfile / Bigfile

Licence: mit
Bigfile -- a file transfer system that supports http, rpc and ftp protocol https://bigfile.site

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Bigfile

Aria2
aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.
Stars: ✭ 25,001 (+13341.4%)
Mutual labels:  rpc, ftp
Deepr
A specification for invoking remote methods, deeply!
Stars: ✭ 181 (-2.69%)
Mutual labels:  rpc
Importexportfree
Improve default Magento 2 Import / Export features - cron jobs, CSV , XML , JSON , Excel , mapping of any format, Google Sheet, data and price modification, improved speed and a lot more!
Stars: ✭ 160 (-13.98%)
Mutual labels:  ftp
Fable.remoting
Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
Stars: ✭ 175 (-5.91%)
Mutual labels:  rpc
Dop
JavaScript implementation for Distributed Object Protocol
Stars: ✭ 163 (-12.37%)
Mutual labels:  rpc
Ipcinvoker
A IPC Invoker for Android Development.
Stars: ✭ 176 (-5.38%)
Mutual labels:  rpc
Brpc Rs
Apache bRPC library for Rust
Stars: ✭ 159 (-14.52%)
Mutual labels:  rpc
Activej
ActiveJ is an alternative Java platform built from the ground up. ActiveJ redefines web, high load, and cloud programming in Java, featuring ultimate performance and scalability!
Stars: ✭ 183 (-1.61%)
Mutual labels:  rpc
Elixir Thrift
A Pure Elixir Thrift Implementation
Stars: ✭ 182 (-2.15%)
Mutual labels:  rpc
Kraps Rpc
A RPC framework leveraging Spark RPC module
Stars: ✭ 175 (-5.91%)
Mutual labels:  rpc
Mos
A hobby operating system developed from scratch
Stars: ✭ 169 (-9.14%)
Mutual labels:  file-system
Surgingdemo
surging 使用入门示例。完成一个基本业务的增删改查示例,并运用Surging强大的分布式缓存功能
Stars: ✭ 165 (-11.29%)
Mutual labels:  rpc
Nanorpc
nanorpc - lightweight RPC in pure C++ 17
Stars: ✭ 177 (-4.84%)
Mutual labels:  rpc
Navi Pbrpc
A protobuf based high performance rpc framework leveraging full-duplexing and asynchronous io with netty
Stars: ✭ 163 (-12.37%)
Mutual labels:  rpc
Rx Explorer
一款轻量的UWP文件管理器 | A lightweight UWP Explorer
Stars: ✭ 184 (-1.08%)
Mutual labels:  file-system
Hprose Php
Hprose is a cross-language RPC. This project is Hprose 3.0 for PHP
Stars: ✭ 1,952 (+949.46%)
Mutual labels:  rpc
Discordrpcmaker
Cross-platform Discord Rich Presence Maker, WITH BUTTONS!
Stars: ✭ 165 (-11.29%)
Mutual labels:  rpc
Evans
Evans: more expressive universal gRPC client
Stars: ✭ 2,710 (+1356.99%)
Mutual labels:  rpc
Go Os
Stars: ✭ 185 (-0.54%)
Mutual labels:  rpc
Doe
自己编写dubbo客户端实现rpc调用,在线调试dubbo接口、dubbo接口可视化测试、自动化测试工具。
Stars: ✭ 183 (-1.61%)
Mutual labels:  rpc

Bigfile ———— a file transfer system that supports http, rpc and ftp protocol 简体中文English


Bigfile is a file transfer system, supports http, ftp and rpc protocol. Designed to provide a file management service and give developers more help. At the bottom, bigfile splits the file into small pieces of 1MB, the same slice will only be stored once.

In fact, we built a file organization system based on the database. Here you can find familiar files and folders.

Since the rpc and http protocols are supported, those languages supported by grpc and other languages can be quickly accessed.

More detailed documents can be found here

Features

  • Support HTTP(s) protocol

    • Support rate limit by ip
    • Support cors
    • Support to avoid replay attack
    • Support to validate parameter signature
    • Support Http Single Range Protocol
  • Support FTP(s) protocol

  • Support RPC protocol

  • Support to deploy by docker

  • Provide document with English and Chinese

Install Bigfile

There are kinds of ways to install Bigfile, you can find more detailed documentation here English 简体中文

Start Bigfile

  1. generate certificates

bigfile rpc:make-cert

  1. start server

bigfile multi:server

This will print some information as follows:

    [2019/09/19 15:38:32.817] 56628 DEBUG  bigfile http service listening on: https://0.0.0.0:10985
    [2019/09/19 15:38:32.818] 56628 DEBUG   Go FTP Server listening on 2121
    [2019/09/19 15:38:32.819] 56628 DEBUG  bigfile rpc service listening on: tcp://[::]:10986

HTTP Example (Token Create)

package main

import (
	"fmt"
	"io/ioutil"
	libHttp "net/http"
	"strings"
	"time"

	"github.com/bigfile/bigfile/databases/models"
	"github.com/bigfile/bigfile/http"
)

func main() {
	appUid := "42c4fcc1a620c9e97188f50b6f2ab199"
	appSecret := "f8f2ae1fe4f70b788254dcc991a35558"
	body := http.GetParamsSignBody(map[string]interface{}{
		"appUid":         appUid,
		"nonce":          models.RandomWithMD5(128),
		"path":           "/images/png",
		"expiredAt":      time.Now().AddDate(0, 0, 2).Unix(),
		"secret":         models.RandomWithMD5(44),
		"availableTimes": -1,
		"readOnly":       false,
	}, appSecret)
	request, err := libHttp.NewRequest(
		"POST", "https://127.0.0.1:10985/api/bigfile/token/create", strings.NewReader(body))
	if err != nil {
		fmt.Println(err)
		return
	}
	request.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	resp, err := libHttp.DefaultClient.Do(request)
	if err != nil {
		fmt.Println(err)
		return
	}
	if bodyBytes, err := ioutil.ReadAll(resp.Body); err != nil {
		fmt.Println(err)
		return
	} else {
		fmt.Println(string(bodyBytes))
	}
}

RPC Example (Token Create)

package main

import (
	"crypto/tls"
	"crypto/x509"
	"fmt"
	"io/ioutil"

	"google.golang.org/grpc"
	"github.com/bigfile/bigfile/rpc"
	"google.golang.org/grpc/credentials"
)

func createConnection() (*grpc.ClientConn, error) {
	var (
		err           error
		conn          *grpc.ClientConn
		cert          tls.Certificate
		certPool      *x509.CertPool
		rootCertBytes []byte
	)
	if cert, err = tls.LoadX509KeyPair("client.pem", "client.key"); err != nil {
		return nil, err
	}

	certPool = x509.NewCertPool()
	if rootCertBytes, err = ioutil.ReadFile("ca.pem"); err != nil {
		return nil, err
	}

	if !certPool.AppendCertsFromPEM(rootCertBytes) {
		return nil, err
	}

	if conn, err = grpc.Dial("192.168.0.103:10986", grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{
		Certificates: []tls.Certificate{cert},
		RootCAs:      certPool,
	}))); err != nil {
		return nil, err
	}
	return conn, err
}

func main() {
	var (
		err  error
		conn *grpc.ClientConn
	)

	if conn, err = createConnection(); err != nil {
		fmt.Println(err)
		return
	}
	defer conn.Close()
	grpcClient := rpc.NewTokenCreateClient(conn)
    	fmt.Println(grpcClient.TokenCreate(context.TODO(), &rpc.TokenCreateRequest{
    		AppUid:    "42c4fcc1a620c9e97188f50b6f2ab199",
    		AppSecret: "f8f2ae1fe4f70b788254dcc991a35558",
    }))
}

FTP Example

ftp-example

FOSSA Status Get it from the Snap Store

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].