Skip to content

Commit 3f0d718

Browse files
KingPrimesKingPrimes
KingPrimes
authored and
KingPrimes
committed
fix(utils): 优化代理工具类并修复 JGit 版本属性
- 在 ProxyUtils 类中,将 localhost 和 127.0.0.1 的比较改为不区分大小写 - 修正 pom.xml 中 org.eclipse.jgit.varsion 属性的拼写错误,改为 org.eclipse.jgit.version
1 parent 3d70d7a commit 3f0d718

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<oshi.version>6.8.0</oshi.version>
3636
<okhttp.version>4.12.0</okhttp.version>
3737
<jjwt.version>0.12.6</jjwt.version>
38-
<org.eclipse.jgit.varsion>7.2.1.202505142326-r</org.eclipse.jgit.varsion>
38+
<org.eclipse.jgit.version>7.2.1.202505142326-r</org.eclipse.jgit.version>
3939
</properties>
4040

4141
<dependencies>
@@ -214,7 +214,7 @@
214214
<dependency>
215215
<groupId>org.eclipse.jgit</groupId>
216216
<artifactId>org.eclipse.jgit</artifactId>
217-
<version>${org.eclipse.jgit.varsion}</version>
217+
<version>${org.eclipse.jgit.version}</version>
218218
</dependency>
219219

220220
<!--YAML操作-->

src/main/java/com/nyx/bot/utils/http/ProxyUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ private static Proxy fromSpringConfig() {
241241
public static boolean shouldBypassProxy(String host) {
242242
if (host == null) return true;
243243
// 添加对本地地址(如 localhost、127.0.0.1)的判断
244-
if (host.equals("localhost") || host.equals("127.0.0.1")) {
244+
if (host.equalsIgnoreCase("localhost") || host.equalsIgnoreCase("127.0.0.1")) {
245245
return true;
246246
}
247247
Set<String> noProxyHosts = getNoProxyHosts();

0 commit comments

Comments
 (0)