开源基于Rust编写的Web服务器

news2025/1/15 17:26:43

基于 RUST 的 WEB 资源服务器

Github 地址

LTPP-GIT 地址

官方文档

该项目于 2024 年 5 月 1 日开始开发

预期功能

功能支持情况当前情况
多线程支持
服务支持配置化
防盗链支持
gzip 支持
反向代理支持
自定义状态码对应资源文件
日志支持
负载均衡支持
域名绑定解析支持
资源解析
history 模式支持
自定义响应头

目前进度

  • 自定义响应头
  • 多线程支持
  • 配置化
  • 日志输出
  • 资源解析
  • history 模式支持
  • 域名绑定支持
  • 一个端口对应多域名支持
  • 反向代理支持
  • 负载均衡支持
  • 防盗链支持
  • gzip 支持

错误页

  • root_path 下名称为 对应状态码.html,例如 404 对应页面 404.html

JSON 示例

首次运行会自动生成 config.json 配置文件,填写好后重新运行即可

[!tip]
以上配置将当前目录作为访问地址的根目录,
监听了 8081 端口,绑定 IP域名127.0.0.1localhost 用来处理请求,
当访问为空则重写路径到当前目录的 index.html(适用于 Vue 等打包后的资源),
日志保存在当前目录 logs

[!tip]
配置中的 listen_ip 为服务端 IPbind_server_name 下的 key 为域名或者 IP, 一般 listen_ip127.0.0.1
如果 bind_server_name 配置了 localhost 域名,那么可以使用 localhost 访问,
但是不支持 127.0.0.1,如需支持 127.0.0.1,在 bind_server_name 中添加即可
如果本地做了映射,需要同时添加映射的域名和 127.0.0.1

反向代理

  • 系统会检测 proxy 数组里每个元素是否是合法 URL,如果是合法 URL 那么系统会加入到反向代理的列表,如果最终反向代理列表为空则会加载静态资源
  • 反向代理会映射请求路径和请求参数,如果配置文件 proxy 中的元素加了路径,系统会忽略
  • 反向代理时,会随机从反向代理列表中获取一个代理地址 PROXY_URL ,系统会截取 PROXY_URL 字段除了 path 部分的 url,实际 path 来自请求时的 path,参数会进行拼接,如果 PROXY_URL 参数和请求参数冲突,请求参数会追加在 PROXY_URL 参数后面

负载均衡

  • 反向代理时,会随机从反向代理列表中获取一个代理地址 PROXY_URL

GZIP

  • 请求头 Accept-Encoding 需要包含 gzip 并且响应头 Content-Encoding 需要包含 gzip
  • 配置 gzip_level 用于设置压缩率,范围从 1 - 9,越大压缩的越小,耗时也会更久,建议 4/5 即可

异常

  • 如果出现页面/请求加载异常的情况,需要增加 buffer_size 数值

防盗链

  • hotlink_protection 使用正则进行匹配(系统内部会额外处理…/防盗链情况)

运行效果

配置文件示例

{
  "server": [
    {
      "listen_ip": "0.0.0.0",
      "listen_port": 80,
      "bind_server_name": {
        "127.0.0.1": {
          "root_path": "./",
          "buffer_size": 10240,
          "gzip_level": 1,
          "log_dir_path": "./logs",
          "empty_path_try_files_path": "./index.html",
          "response_header_list": [
            "Server: RUST-WEB-SERVER",
            "Access-Control-Allow-Credentials: true",
            "Access-Control-Allow-Headers: *",
            "Access-Control-Allow-Methods: *",
            "Access-Control-Allow-Origin: *",
            "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
            "Content-Type: text/html",
            "Content-Encoding: gzip"
          ],
          "proxy": [],
          "proxy_timeout_seconds": 10,
          "hotlink_protection": []
        },
        "localhost": {
          "root_path": "./",
          "buffer_size": 10240,
          "gzip_level": 1,
          "log_dir_path": "./logs",
          "empty_path_try_files_path": "./index.html",
          "response_header_list": [
            "Server: RUST-WEB-SERVER",
            "Access-Control-Allow-Credentials: true",
            "Access-Control-Allow-Headers: *",
            "Access-Control-Allow-Methods: *",
            "Access-Control-Allow-Origin: *",
            "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
            "Content-Type: application/json",
            "Content-Encoding: gzip"
          ],
          "proxy": [
            "https://api.ltpp.vip",
            "https://api.ltpp.vip/Version/getVersion",
            "https://api.ltpp.vip/Version/getVersion?origin=proxy1"
          ],
          "proxy_timeout_seconds": 10,
          "hotlink_protection": []
        }
      }
    },
    {
      "listen_ip": "0.0.0.0",
      "listen_port": 81,
      "bind_server_name": {
        "127.0.0.1": {
          "root_path": "./",
          "buffer_size": 10240,
          "gzip_level": 1,
          "log_dir_path": "./logs",
          "empty_path_try_files_path": "./index.html",
          "response_header_list": [
            "Access-Control-Allow-Origin: *",
            "Access-Control-Allow-Methods: *",
            "Access-Control-Allow-Headers: *",
            "Access-Control-Allow-Credentials: true",
            "Server: RUST-WEB-SERVER",
            "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
            "Content-Type: application/json",
            "Content-Encoding: gzip"
          ],
          "proxy": ["https://api.ltpp.vip/Version/getVersion?origin=proxy1"],
          "proxy_timeout_seconds": 10,
          "hotlink_protection": ["origin=1$"]
        }
      }
    }
  ]
}

运行效果

在这里插入图片描述
在这里插入图片描述

日志

支持配置,日期和完整请求记录

[2024-05-28 23:40:07]
Binding => 127.0.0.1:80
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Server: RUST-WEB-SERVER",
        "Access-Control-Allow-Credentials: true",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Origin: *",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: text/html",
        "Content-Encoding: gzip",
    ],
    proxy: [],
    proxy_timeout_seconds: 10,
    hotlink_protection: [],
}
Binding => localhost:80
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Server: RUST-WEB-SERVER",
        "Access-Control-Allow-Credentials: true",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Origin: *",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: application/json",
        "Content-Encoding: gzip",
    ],
    proxy: [
        "https://api.ltpp.vip",
        "https://api.ltpp.vip/Version/getVersion",
        "https://api.ltpp.vip/Version/getVersion?origin=proxy1",
    ],
    proxy_timeout_seconds: 10,
    hotlink_protection: [],
}



[2024-05-28 23:40:07]
Binding => 127.0.0.1:80
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Server: RUST-WEB-SERVER",
        "Access-Control-Allow-Credentials: true",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Origin: *",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: text/html",
        "Content-Encoding: gzip",
    ],
    proxy: [],
    proxy_timeout_seconds: 10,
    hotlink_protection: [],
}
Binding => localhost:80
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Server: RUST-WEB-SERVER",
        "Access-Control-Allow-Credentials: true",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Origin: *",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: application/json",
        "Content-Encoding: gzip",
    ],
    proxy: [
        "https://api.ltpp.vip",
        "https://api.ltpp.vip/Version/getVersion",
        "https://api.ltpp.vip/Version/getVersion?origin=proxy1",
    ],
    proxy_timeout_seconds: 10,
    hotlink_protection: [],
}



[2024-05-28 23:40:07]
Binding => 127.0.0.1:81
Server {
    root_path: "./",
    buffer_size: 10240,
    gzip_level: 1,
    log_dir_path: "./logs",
    empty_path_try_files_path: "./index.html",
    response_header_list: [
        "Access-Control-Allow-Origin: *",
        "Access-Control-Allow-Methods: *",
        "Access-Control-Allow-Headers: *",
        "Access-Control-Allow-Credentials: true",
        "Server: RUST-WEB-SERVER",
        "Git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git",
        "Content-Type: application/json",
        "Content-Encoding: gzip",
    ],
    proxy: [
        "https://api.ltpp.vip/Version/getVersion?origin=proxy1",
    ],
    proxy_timeout_seconds: 10,
    hotlink_protection: [
        "origin=1$",
    ],
}



[2024-05-28 23:40:07]
Listening => 0.0.0.0:80


[2024-05-28 23:40:07]
Binding => 127.0.0.1:80


[2024-05-28 23:40:07]
Binding => localhost:80


[2024-05-28 23:40:07]
Binding => 127.0.0.1:80


[2024-05-28 23:40:07]
Listening => 0.0.0.0:81


[2024-05-28 23:40:07]
Binding => 127.0.0.1:81


[2024-05-28 23:40:07]
Binding => localhost:81


[2024-05-28 23:40:07]
Binding => 127.0.0.1:81


[2024-05-28 23:40:10]
HttpRequest {
    path: "/_static/out/browser/serviceWorker.js",
    method: "GET",
    query: [],
    headers: {
        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        "accept": "*/*",
        "service-worker": "script",
        "sec-fetch-dest": "serviceworker",
        "sec-fetch-mode": "same-origin",
        "referer": "http://127.0.0.1/_static/out/browser/serviceWorker.js",
        "accept-encoding": "gzip, deflate, br, zstd",
        "cache-control": "max-age=0",
        "host": "127.0.0.1",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        "cookie": "SameSite=Lax; Hm_lvt_9793f42b498361373512340937deb2a0=1689155374; _ga=GA1.1.39230079.1707025003; _ga_69MPZE94D5=GS1.1.1707025002.1.1.1707026740.0.0.0; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=5RJrrwsVlvqY7uteEWcRoXI%2BvTKWWpA23SKZpX9BCDRw8Q17ueAcTXRd8Po%3D",
        "sec-fetch-site": "same-origin",
        "connection": "keep-alive",
    },
    body: {
        "sec-fetch-site": [
            "same-origin",
        ],
        "accept-encoding": [
            "gzip, deflate, br, zstd",
        ],
        "accept": [
            "*/*",
        ],
        "user-agent": [
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        ],
        "connection": [
            "keep-alive",
        ],
        "cache-control": [
            "max-age=0",
        ],
        "cookie": [
            "SameSite=Lax; Hm_lvt_9793f42b498361373512340937deb2a0=1689155374; _ga=GA1.1.39230079.1707025003; _ga_69MPZE94D5=GS1.1.1707025002.1.1.1707026740.0.0.0; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=5RJrrwsVlvqY7uteEWcRoXI%2BvTKWWpA23SKZpX9BCDRw8Q17ueAcTXRd8Po%3D",
        ],
        "accept-language": [
            "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        ],
        "sec-fetch-mode": [
            "same-origin",
        ],
        "host": [
            "127.0.0.1",
        ],
        "referer": [
            "http://127.0.0.1/_static/out/browser/serviceWorker.js",
        ],
        "sec-fetch-dest": [
            "serviceworker",
        ],
        "service-worker": [
            "script",
        ],
    },
}

[2024-05-28 23:40:10]
Resource load fail => ./_static/out/browser/serviceWorker.js


[2024-05-28 23:40:21]
HttpRequest {
    path: "/Version/getVersion",
    method: "GET",
    query: [
        (
            "origin",
            "proxy1",
        ),
    ],
    headers: {
        "sec-ch-ua-mobile": "?0",
        "connection": "keep-alive",
        "sec-ch-ua": "\"Microsoft Edge\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        "sec-fetch-site": "none",
        "sec-fetch-user": "?1",
        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        "sec-fetch-dest": "document",
        "host": "127.0.0.1:81",
        "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "accept-encoding": "gzip, deflate, br, zstd",
        "upgrade-insecure-requests": "1",
        "sec-fetch-mode": "navigate",
        "cookie": "SameSite=Lax; Hm_lvt_9793f42b498361373512340937deb2a0=1689155374; _ga=GA1.1.39230079.1707025003; _ga_69MPZE94D5=GS1.1.1707025002.1.1.1707026740.0.0.0; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=5RJrrwsVlvqY7uteEWcRoXI%2BvTKWWpA23SKZpX9BCDRw8Q17ueAcTXRd8Po%3D",
        "sec-ch-ua-platform": "\"Windows\"",
    },
    body: {
        "sec-fetch-user": [
            "?1",
        ],
        "accept-language": [
            "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        ],
        "sec-fetch-site": [
            "none",
        ],
        "accept": [
            "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        ],
        "sec-ch-ua-platform": [
            "\"Windows\"",
        ],
        "accept-encoding": [
            "gzip, deflate, br, zstd",
        ],
        "host": [
            "127.0.0.1:81",
        ],
        "sec-fetch-mode": [
            "navigate",
        ],
        "upgrade-insecure-requests": [
            "1",
        ],
        "sec-fetch-dest": [
            "document",
        ],
        "sec-ch-ua-mobile": [
            "?0",
        ],
        "cookie": [
            "SameSite=Lax; Hm_lvt_9793f42b498361373512340937deb2a0=1689155374; _ga=GA1.1.39230079.1707025003; _ga_69MPZE94D5=GS1.1.1707025002.1.1.1707026740.0.0.0; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=5RJrrwsVlvqY7uteEWcRoXI%2BvTKWWpA23SKZpX9BCDRw8Q17ueAcTXRd8Po%3D",
        ],
        "sec-ch-ua": [
            "\"Microsoft Edge\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"",
        ],
        "connection": [
            "keep-alive",
        ],
        "user-agent": [
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        ],
    },
}

[2024-05-28 23:40:21]
Proxy url info => https://api.ltpp.vip:443/Version/getVersion?origin=proxy1&origin=proxy1


[2024-05-28 23:40:22]
Request response info:
HTTP/1.1 200 OK
content-length: 90
access-control-allow-methods: GET, POST, PATCH
access-control-allow-headers: Authorization,Requestid,Key,Content-Type,If-Match,If-Modified-Since,If-None-Match,If-Unmodified-Since,X-CSRF-TOKEN,X-Requested-With
git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git
access-control-allow-origin: *
content-encoding: gzip
access-control-allow-credentials: true
content-type: application/json
server: nginx
connection: keep-alive
date: Tue, 28 May 2024 15:40:21 GMT
strict-transport-security: max-age=88888888
access-control-max-age: 88888888



{"code":1,"version":"2.8.0","ltpp_win_download_url":"","ltpp_mac_download_url":"","ltpp_apk_download_url":""}


[2024-05-28 23:40:24]
HttpRequest {
    path: "/Version/getVersion",
    method: "GET",
    query: [
        (
            "origin",
            "proxy1",
        ),
    ],
    headers: {
        "connection": "keep-alive",
        "accept-encoding": "gzip, deflate, br, zstd",
        "cache-control": "max-age=0",
        "sec-fetch-mode": "navigate",
        "sec-ch-ua-platform": "\"Windows\"",
        "sec-fetch-site": "none",
        "host": "localhost",
        "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        "sec-ch-ua-mobile": "?0",
        "sec-fetch-user": "?1",
        "sec-fetch-dest": "document",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        "upgrade-insecure-requests": "1",
        "cookie": "SameSite=Lax; NMTID=00O6oBSFUZ8KxSqKEY4tcbYD677Qa8AAAGKxntltw; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=c3t%2FwkS4xVdqQ2GLp7IkQdf9cc4d3ClA8ae5euc5DJ4EKvgSZv6qnjCaabI%3D",
        "sec-ch-ua": "\"Microsoft Edge\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"",
    },
    body: {
        "sec-ch-ua-platform": [
            "\"Windows\"",
        ],
        "sec-ch-ua": [
            "\"Microsoft Edge\";v=\"125\", \"Chromium\";v=\"125\", \"Not.A/Brand\";v=\"24\"",
        ],
        "upgrade-insecure-requests": [
            "1",
        ],
        "user-agent": [
            "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0",
        ],
        "cookie": [
            "SameSite=Lax; NMTID=00O6oBSFUZ8KxSqKEY4tcbYD677Qa8AAAGKxntltw; pma_lang=zh_CN; pma_theme=bootstrap; pmaUser-1=c3t%2FwkS4xVdqQ2GLp7IkQdf9cc4d3ClA8ae5euc5DJ4EKvgSZv6qnjCaabI%3D",
        ],
        "accept": [
            "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
        ],
        "cache-control": [
            "max-age=0",
        ],
        "host": [
            "localhost",
        ],
        "sec-fetch-user": [
            "?1",
        ],
        "sec-fetch-dest": [
            "document",
        ],
        "accept-language": [
            "zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6",
        ],
        "connection": [
            "keep-alive",
        ],
        "sec-fetch-mode": [
            "navigate",
        ],
        "sec-ch-ua-mobile": [
            "?0",
        ],
        "accept-encoding": [
            "gzip, deflate, br, zstd",
        ],
        "sec-fetch-site": [
            "none",
        ],
    },
}

[2024-05-28 23:40:24]
Proxy url info => https://api.ltpp.vip:443/Version/getVersion?origin=proxy1


[2024-05-28 23:40:24]
Request response info:
HTTP/1.1 200 OK
content-length: 90
strict-transport-security: max-age=88888888
access-control-max-age: 88888888
access-control-allow-headers: Authorization,Requestid,Key,Content-Type,If-Match,If-Modified-Since,If-None-Match,If-Unmodified-Since,X-CSRF-TOKEN,X-Requested-With
content-type: application/json
access-control-allow-origin: *
access-control-allow-methods: GET, POST, PATCH
git: https://git.ltpp.vip/root/RUST-WEB-SERVE.git
date: Tue, 28 May 2024 15:40:23 GMT
server: nginx
connection: keep-alive
content-encoding: gzip
access-control-allow-credentials: true



{"code":1,"version":"2.8.0","ltpp_win_download_url":"","ltpp_mac_download_url":"","ltpp_apk_download_url":""}



本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1713102.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

网关(GateWay)- 快速使用

引入依赖 <!-- gateway --> <dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-gateway</artifactId> </dependency> 路由配置 server:port: 8088 spring:application:name: api-gatew…

一书读懂Python全栈安全,剑指网络空间安全

写在前面 通过阅读《Python全栈安全/网络空间安全丛书》&#xff0c;您将能够全面而深入地理解Python全栈安全的广阔领域&#xff0c;从基础概念到高级应用无一遗漏。本书不仅详细解析了Python在网络安全、后端开发、数据分析及自动化等全栈领域的安全实践&#xff0c;还紧密贴…

Java设计模式-活动对象与访问者

活动对象 Java设计模式中&#xff0c;活动对象是指一个对象始终处于活动的状态&#xff0c;该对象包括一个线程安全的数据结构以及一个活跃的执行线程。 如上所示&#xff0c;ActiveCreature类的构造函数初始化一个线程安全的数据结构&#xff08;阻塞队列&#xff09;、初始化…

IAR9.30安装和注册相关

下载解压licpatcher64工具&#xff0c;把licpatcher64.exe拷贝到IAR的安装目录中双击运行。 示例IAR9.30.1默认安装如下如下&#xff0c;一共三个分别拷贝运行&#xff0c;不要遗漏。 C:\Program Files\IAR Systems\Embedded Workbench 9.1\arm\bin C:\Program Files\IAR Syst…

DiffIR论文阅读笔记

ICCV2023的一篇用diffusion模型做Image Restoration的论文&#xff0c;一作是清华的教授&#xff0c;还在NIPS2023上一作发表了Hierarchical Integration Diffusion Model for Realistic Image Deblurring&#xff0c;作者里甚至有Luc Van Gool大佬。模型分三个部分&#xff0c…

无需安装的在线PS:打开即用

为什么想用在线PS网页版&#xff1f;Photoshop常用于平面设计&#xff0c;是不少设计师接触过的第一款设计软件。作为一款平面设计工具&#xff0c;ps功能太多&#xff0c;并且没有在线版&#xff0c;这不仅需要设计师花费时间学习软件&#xff0c;还需要设计师具备一定的设计能…

2023年全球DDoS攻击现状与趋势分析

天翼安全科技有限公司副总工程师、运营保障部总经理陈林表示&#xff0c;2023年扫段攻击频次快速增长&#xff0c;成为网络基础设施面临的最大威胁。为躲避防御&#xff0c;低速扫段攻击成为主流达到攻击总数的73.19%&#xff1b;43.26%的C段攻击持续时间小于5分钟&#xff0c;…

Science Advances|柔性超韧半导体纤维的大规模制备(柔性半导体器件/可穿戴电子/纤维器件/柔性电子)

北京大学 雷霆(Ting Lei)团队,在《Science Advances》上发布了一篇题为“Continuous production of ultratough semiconducting polymer fibers with high electronic performance”的论文。论文内容如下: 一、 摘要 共轭聚合物具有良好的光电特性,但其脆性和机械特性差,…

03 Prometheus+Grafana可视化配置

03 PrometheusGrafana可视化配置 大家好&#xff0c;我是秋意零。接上篇Prometheus入门安装教程 grafana官网下载安装包比较慢&#xff0c;如果没有魔法。可关注公众号【秋意零】回复101获取 Grafana官网下载&#xff1a;https://grafana.com/grafana/download 这里采用的二进制…

定个小目标之每天刷LeetCode热题(3)

这是一道简单题&#xff0c;我这里就只讲两种解法 第一种是数组加双指针&#xff0c;先遍历链表将值存到数组里&#xff0c;然后分别从数组两端进行一一比较判断是否满足回文&#xff0c;代码实现 class Solution {public boolean isPalindrome(ListNode head) {List<Inte…

重生奇迹mu卡智力的方法

1、准备3个号A打手,B智力MM,C随意。 2、使用C匹配组队,但是不能选择自动进入队伍。 3、用A申请C的队伍,但是C不做通过处理。 4、用A组B,用快捷键D的方式。 5、所谓的卡智力就是智力MM可以给打手加属性加血&#xff0c;但是并不在一个队伍里享受经验&#xff0c;适用于MM不是…

如何批量结构化分汇多工作表sheet?

目录 一、如遇合并表格&#xff0c;注意结构化二、确认主键&#xff0c;合并所有文件数据三、sheet2同理四、案例总结 如果遇到这样情形&#xff0c;多文件夹多文件&#xff0c;多工作表的分汇场景&#xff1b;可以参考以下方法解决。 一、如遇合并表格&#xff0c;注意结构…

Python 机器学习 基础 之 算法链与管道 【算法链与管道/预处理进行参数选择/构建管道/在网格搜索中使用管道】的简单说明

Python 机器学习 基础 之 算法链与管道 【算法链与管道/预处理进行参数选择/构建管道/在网格搜索中使用管道】的简单说明 目录 Python 机器学习 基础 之 算法链与管道 【算法链与管道/预处理进行参数选择/构建管道/在网格搜索中使用管道】的简单说明 一、简单介绍 二、算法链…

「异步魔法:Python数据库交互的革命」(一)

Hi&#xff0c;我是阿佑&#xff0c;今天将和大家一块打开异步魔法的大门&#xff0c;进入Python异步编程的神秘领域&#xff0c;学习如何同时施展多个咒语而不需等待。了解asyncio的魔力&#xff0c;掌握Async SQLAlchemy和Tortoise-ORM的秘密&#xff0c;让你的数据库操作快如…

2024广东省赛 G.Menji 和 gcd

题目 #include <bits/stdc.h> using namespace std; #define int long long #define pb push_back #define fi first #define se second #define lson p << 1 #define rson p << 1 | 1 #define ll long long const int maxn 1e6 5, inf 1e12, maxm 4e4 …

脑机接口:是现代医学的外挂,更是瘫痪病人的豪赌

5 月 17 日&#xff0c;马斯克公开表示&#xff0c;继今年年初首次成功将大脑芯片植入患者大脑后&#xff0c;Neuralink 正在寻找第二位受试者接受这项手术。 5 月 20 日&#xff0c;美国食品药品监督管理局 (FDA) 批准了马斯克的 Neuralink 公司为第二位患者植入脑芯片&#…

超详细介绍基于微调 Faster R-CNN实现海上航拍图像中检测小物体-含源码与数据集免费下载

在航拍图像中检测小物体,尤其是对于海上救援等关键应用而言,是一项独特的挑战。及时检测水中的人可能意味着生死之间的差别。我们的研究重点是微调 Faster R-CNN(一种强大的两阶段物体检测器),以满足这一重要需求。 我们研究的核心是SeaDroneSee 数据集,这是一组重要的图…

Springboot项目搭建 jdk1.8

1.idea创建项目 2.项目配置 maven 编辑项目编码 删除无用文件 修改配置文件后缀&#xff0c;设置数据库 spring:datasource:driver-class-name: com.mysql.cj.jdbc.Driverurl:jdbc:mysql://localhost:3306/honey2024?useSSLfalse&useUnicodetrue&characterEncodingUT…

随手记:多行文本域存数据有换行,回显数据换行展示

1.在新增的时候存储数据 <el-input type"textarea"v-model"XXXX"></el-input> 2.详情页返回的数据&#xff1a; replace一顿操作确实复杂 最快的方法直接写个样式:style"white-space: pre-line" 即可行内或者class样式都可以 …

windows 下载redis (通过redis-server.exe启动服务)

下载链接&#xff1a; https://github.com/MicrosoftArchive/redis/releases 启动&#xff1a; 查看&#xff1a; 人工智能学习网站 https://chat.xutongbao.top