Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

Commit 8261365

Browse files
committed
Initial commit
0 parents  commit 8261365

15 files changed

Lines changed: 551 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: build
2+
on: [ pull_request, push ]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout repository
9+
uses: actions/checkout@v4
10+
- name: Setup JDK 21
11+
uses: actions/setup-java@v4
12+
with:
13+
java-version: 21
14+
distribution: 'temurin'
15+
- name: Setup Gradle
16+
uses: gradle/actions/setup-gradle@v4
17+
- name: Build
18+
run: ./gradlew clean build --no-daemon
19+
- name: Capture build artifacts
20+
uses: actions/upload-artifact@v4
21+
with:
22+
compression-level: 9
23+
if-no-files-found: error
24+
path: build/libs/*.jar

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
.gradle
3+
build
4+
run

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# AuthProxy
2+
3+
一个简单的 Minecraft Fabric mod,允许服务端使用代理服务器进行用户验证。
4+
5+
## 使用方法
6+
7+
运行服务器时给服务器传递以下两类参数中的一类:
8+
9+
- Socks5 代理:`socksProxyHost` 设置为代理服务器的地址,`socksProxyPort` 设置为代理服务器的端口。
10+
- HTTP/HTTPS 代理:`http.proxyHost` 设置为代理服务器的地址,`http.proxyPort` 设置为代理服务器的端口。
11+
12+
然后启动你的服务器,观察日志中是否出现:
13+
14+
- "Use SOCKS proxy: 地址:端口"
15+
- "Use HTTP proxy: 地址:端口"
16+
17+
如果没有设置代理服务器,则会出现:
18+
19+
- "No proxy used"
20+
21+
# 兼容性
22+
23+
只测试过 1.21.5 可以正常使用,其他的版本兼容性尚未测试。

build.gradle.kts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
plugins {
2+
alias(libs.plugins.fabric.loom)
3+
}
4+
5+
group = "top.fifthlight.authproxy"
6+
version = "0.0.1"
7+
8+
repositories {
9+
mavenCentral()
10+
}
11+
12+
dependencies {
13+
minecraft(libs.minecraft)
14+
mappings(variantOf(libs.yarn) { classifier("v2") })
15+
16+
modImplementation(libs.fabric.loader)
17+
}
18+
19+
loom {
20+
mixin {
21+
useLegacyMixinAp = false
22+
}
23+
}
24+
25+
tasks.processResources {
26+
inputs.properties("version" to project.version)
27+
28+
filesMatching("fabric.mod.json") {
29+
expand("version" to inputs.properties["version"])
30+
}
31+
}
32+
33+
java {
34+
toolchain {
35+
sourceCompatibility = JavaVersion.VERSION_1_8
36+
targetCompatibility = JavaVersion.VERSION_1_8
37+
}
38+
}
39+

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kotlin.code.style=official

gradle/libs.versions.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[versions]
2+
fabric-loader = "0.16.10"
3+
loom = "1.10.1"
4+
minecraft = "1.21.5"
5+
yarn = "1.21.5+build.1"
6+
7+
[libraries]
8+
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" }
9+
yarn = { group = "net.fabricmc", name = "yarn", version.ref = "yarn" }
10+
fabric-loader = { group = "net.fabricmc", name = "fabric-loader", version.ref = "fabric-loader" }
11+
12+
[plugins]
13+
fabric-loom = { id = "fabric-loom", version.ref = "loom" }

gradle/wrapper/gradle-wrapper.jar

59.3 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Thu Mar 27 23:56:09 CST 2025
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

gradlew

Lines changed: 234 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)