Skip to content

Instantly share code, notes, and snippets.

View xjoker's full-sized avatar

xJoker xjoker

  • China/Fujian
View GitHub Profile
@xjoker
xjoker / vpstown-a3-debian13-proxmox-install.sh
Created September 6, 2025 13:11
用于VPS.Town主机商的A3区域Debian13的Proxmox安装脚本。系统要求安装主机商的Debian13
#!/bin/bash
#
# Proxmox VE on Debian 13 - 优化版单脚本安装
# 架构重构:大幅精简代码,提升可维护性
#
set -eo pipefail
# =============================================================================
# 核心配置和工具函数
@xjoker
xjoker / dockerfile
Created July 4, 2025 10:48
build caddy
FROM --platform=linux/amd64 caddy:2-builder AS builder
RUN apk add --no-cache build-base brotli-dev
RUN CGO_ENABLED=1 xcaddy build \
--with github.com/caddy-dns/cloudflare \
--with github.com/mholt/caddy-ratelimit \
--with github.com/mholt/caddy-l4 \
--with github.com/dunglas/caddy-cbrotli
FROM --platform=linux/amd64 caddy:2
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
@xjoker
xjoker / xray_auto_install.sh
Last active May 20, 2025 03:14
xray_auto_install
#!/bin/bash
# 函数:显示绿色信息
log_info() {
echo -e "\033[32m[INFO] $1\033[0m"
}
# 函数:显示黄色警告
log_warn() {
echo -e "\033[33m[WARN] $1\033[0m"
@xjoker
xjoker / dockerfile
Created April 18, 2023 03:17
build caddy webdav
FROM golang:1.20.3 AS build
ARG version
ARG xcaddy_arg
WORKDIR /src
RUN go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
RUN xcaddy build ${version} ${xcaddy_arg}
FROM alpine:3.16 AS base
ARG version
@xjoker
xjoker / InstallDotnet.sh
Created September 21, 2022 07:43
install dotnet core to Armbian
curl -L https://dot.net/v1/dotnet-install.sh | bash -s -- --install-dir /var/lib/dotnet/
rm /etc/profile.d/dotnet_env.sh
echo 'DOTNET_ROOT=/var/lib/dotnet' >> /etc/profile.d/dotnet_env.sh
echo 'PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> /etc/profile.d/dotnet_env.sh
echo 'export PATH' >> /etc/profile.d/dotnet_env.sh
@xjoker
xjoker / md5.cs
Created February 24, 2022 03:30
MD5算法逻辑学习
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApp11
{
internal class Program
{
private static uint A = 0x67452301;
@xjoker
xjoker / docker-compose.yaml
Created January 20, 2022 09:27
Single machine deploy redis cluster
version: "3"
# EN
# replace "123123123" to your password
# replace "172.26.14.16" to your machine real ip
# redis port range is 6379 to 6381
# sentinel port range is 26379 to 26381
# CN
# 替换 123123123 为密码
@xjoker
xjoker / OkHttp3Hook.java
Last active January 18, 2022 07:51
OkHttp3Hook
public class OkHttp3Hook {
private static final String TAG = "OkHttp3Hook";
private static final String realCallClassName = "okhttp3.RealCall";
private static final String httpUrlClassName = "okhttp3.HttpUrl";
private static final String requestBuilderClassName = "okhttp3.Request$Builder";
private static final String getResponseWithInterceptorChainMethodName = "getResponseWithInterceptorChain";
/**
@xjoker
xjoker / xhs_x-s.js
Created December 23, 2021 10:09
小红书x-s算法
var encFunc = function (inValue) {
var result = "";
var v1, v2, v3, v4, v5, v6, v7;
var index = 0x0;
var secDict =
"A4NjFqYu5wPHsO0XTdDgMa2r1ZQocVte9UJBvk6/7=yRnhISGKblCWi+LpfE8xzm3";
while (index < inValue.length) {
v1 = inValue.charCodeAt(index++);
v2 = inValue.charCodeAt(index++);
v3 = inValue.charCodeAt(index++);
@xjoker
xjoker / ldap.cs
Created November 21, 2021 01:58
LDAP SSL 连接
using System;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using Novell.Directory.Ldap;
namespace LDAPTest
{
class Program
{
static void Main(string[] args)