GithubHelp home page GithubHelp logo

haoqi7 / filetransfer Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 12.62 MB

文件传输

Home Page: https://code.haoqiyong.cf/

License: Apache License 2.0

Dockerfile 0.44% Go 96.82% HTML 2.36% Makefile 0.21% Nix 0.17%

filetransfer's Introduction

文件快传

只需简单1步,极速文件互传,从未这样爽过!

前期准备

其他服务都开箱即可使用,无需进行初始化之类的操作

项目结构

-FileTransfer-Local-main
    |-bootstrap 插件目录
    |-config 配置文件目录
    |-controller 控制器目录
    |-data  数据库sql存放目录
    |-middlewares 中间件目录
    |-models 数据库模型目录
    |-pkg 第三方包目录
    |-routers 路由目录
    |-runtime 默认下载目录
    |-web web资源目录
        |-css css文件目录
        |-fonts 字体目录
        |-js js文件目录
    |-main.go 程序执行入口

如何运行?

  • 把代码clone到自己电脑或者服务器上

  • 修改配置config/app.ini

      #debug or release
      RUN_MODE = release
    
      [app]
      # 每秒请求限制次数
      LIMIT_COUNT_PER_SECOND = 7
      # 此配置目前使用不到
      JWT_SECRET = 23347$040412
      #上传路径
      UPLOAD_DIR = /FileTransfer/runtime/upload/
      # 上传标题
      UPLOAD_TITLE = 只需简单1步极速文件互传从未这样爽过!
      # 上传描述
      UPLOAD_DESC = 建议文件大小不超过1024M
      # 下载url
      DOWN_DOMAIN = /api/d/
      # 网站标题
      WEB_NAME = 点点笔记
      # 网站URL
      WEB_URL =
      # 网站备案号
      WEB_MIT = 
      # 子标题
      WEB_SUB_TITLE = 
      # 提示
      WEB_NOTICE = 
      PROXY = false
    
      [server]
      ADDR_IP = 0.0.0.0
      HTTP_PORT = 8999
  • 运行

     go run main.go

    后台运行

    nohup go run main.go &

nginx反向代理

server{
  listen 443 ssl;
  server_name you-domain;

  location / {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_redirect off;
      proxy_pass http://127.0.0.1:8999;
  }
}

filetransfer's People

Contributors

haoqi7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.