diff --git a/plugins/cms/.gitattributes b/plugins/cms/.gitattributes deleted file mode 100644 index 3b41682ac5..0000000000 --- a/plugins/cms/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/mvnw text eol=lf -*.cmd text eol=crlf diff --git a/plugins/cms/.mvn/wrapper/maven-wrapper.properties b/plugins/cms/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 12fbe1e907..0000000000 --- a/plugins/cms/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,19 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -wrapperVersion=3.3.2 -distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip diff --git a/plugins/cms/mvnw b/plugins/cms/mvnw deleted file mode 100755 index 19529ddf8c..0000000000 --- a/plugins/cms/mvnw +++ /dev/null @@ -1,259 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.2 -# -# Optional ENV vars -# ----------------- -# JAVA_HOME - location of a JDK home dir, required when download maven via java source -# MVNW_REPOURL - repo url base for downloading maven distribution -# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output -# ---------------------------------------------------------------------------- - -set -euf -[ "${MVNW_VERBOSE-}" != debug ] || set -x - -# OS specific support. -native_path() { printf %s\\n "$1"; } -case "$(uname)" in -CYGWIN* | MINGW*) - [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" - native_path() { cygpath --path --windows "$1"; } - ;; -esac - -# set JAVACMD and JAVACCMD -set_java_home() { - # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched - if [ -n "${JAVA_HOME-}" ]; then - if [ -x "$JAVA_HOME/jre/sh/java" ]; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - JAVACCMD="$JAVA_HOME/jre/sh/javac" - else - JAVACMD="$JAVA_HOME/bin/java" - JAVACCMD="$JAVA_HOME/bin/javac" - - if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then - echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 - echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 - return 1 - fi - fi - else - JAVACMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v java - )" || : - JAVACCMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v javac - )" || : - - if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then - echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 - return 1 - fi - fi -} - -# hash string like Java String::hashCode -hash_string() { - str="${1:-}" h=0 - while [ -n "$str" ]; do - char="${str%"${str#?}"}" - h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) - str="${str#?}" - done - printf %x\\n $h -} - -verbose() { :; } -[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } - -die() { - printf %s\\n "$1" >&2 - exit 1 -} - -trim() { - # MWRAPPER-139: - # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. - # Needed for removing poorly interpreted newline sequences when running in more - # exotic environments such as mingw bash on Windows. - printf "%s" "${1}" | tr -d '[:space:]' -} - -# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties -while IFS="=" read -r key value; do - case "${key-}" in - distributionUrl) distributionUrl=$(trim "${value-}") ;; - distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; - esac -done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" -[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" - -case "${distributionUrl##*/}" in -maven-mvnd-*bin.*) - MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ - case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in - *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; - :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; - :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; - :Linux*x86_64*) distributionPlatform=linux-amd64 ;; - *) - echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 - distributionPlatform=linux-amd64 - ;; - esac - distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" - ;; -maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; -*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; -esac - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" -distributionUrlName="${distributionUrl##*/}" -distributionUrlNameMain="${distributionUrlName%.*}" -distributionUrlNameMain="${distributionUrlNameMain%-bin}" -MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" -MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" - -exec_maven() { - unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : - exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" -} - -if [ -d "$MAVEN_HOME" ]; then - verbose "found existing MAVEN_HOME at $MAVEN_HOME" - exec_maven "$@" -fi - -case "${distributionUrl-}" in -*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; -*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; -esac - -# prepare tmp dir -if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then - clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } - trap clean HUP INT TERM EXIT -else - die "cannot create temp dir" -fi - -mkdir -p -- "${MAVEN_HOME%/*}" - -# Download and Install Apache Maven -verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -verbose "Downloading from: $distributionUrl" -verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -# select .zip or .tar.gz -if ! command -v unzip >/dev/null; then - distributionUrl="${distributionUrl%.zip}.tar.gz" - distributionUrlName="${distributionUrl##*/}" -fi - -# verbose opt -__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' -[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v - -# normalize http auth -case "${MVNW_PASSWORD:+has-password}" in -'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; -has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; -esac - -if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then - verbose "Found wget ... using wget" - wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" -elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then - verbose "Found curl ... using curl" - curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" -elif set_java_home; then - verbose "Falling back to use Java to download" - javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" - targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" - cat >"$javaSource" <<-END - public class Downloader extends java.net.Authenticator - { - protected java.net.PasswordAuthentication getPasswordAuthentication() - { - return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); - } - public static void main( String[] args ) throws Exception - { - setDefault( new Downloader() ); - java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); - } - } - END - # For Cygwin/MinGW, switch paths to Windows format before running javac and java - verbose " - Compiling Downloader.java ..." - "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" - verbose " - Running Downloader.java ..." - "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" -fi - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -if [ -n "${distributionSha256Sum-}" ]; then - distributionSha256Result=false - if [ "$MVN_CMD" = mvnd.sh ]; then - echo "Checksum validation is not supported for maven-mvnd." >&2 - echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - elif command -v sha256sum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then - distributionSha256Result=true - fi - elif command -v shasum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then - distributionSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 - echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - fi - if [ $distributionSha256Result = false ]; then - echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 - echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 - exit 1 - fi -fi - -# unzip and move -if command -v unzip >/dev/null; then - unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" -else - tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" -fi -printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" -mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" - -clean || : -exec_maven "$@" diff --git a/plugins/cms/mvnw.cmd b/plugins/cms/mvnw.cmd deleted file mode 100644 index 249bdf3822..0000000000 --- a/plugins/cms/mvnw.cmd +++ /dev/null @@ -1,149 +0,0 @@ -<# : batch portion -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.2 -@REM -@REM Optional ENV vars -@REM MVNW_REPOURL - repo url base for downloading maven distribution -@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output -@REM ---------------------------------------------------------------------------- - -@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) -@SET __MVNW_CMD__= -@SET __MVNW_ERROR__= -@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% -@SET PSModulePath= -@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( - IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) -) -@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% -@SET __MVNW_PSMODULEP_SAVE= -@SET __MVNW_ARG0_NAME__= -@SET MVNW_USERNAME= -@SET MVNW_PASSWORD= -@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) -@echo Cannot start maven from wrapper >&2 && exit /b 1 -@GOTO :EOF -: end batch / begin powershell #> - -$ErrorActionPreference = "Stop" -if ($env:MVNW_VERBOSE -eq "true") { - $VerbosePreference = "Continue" -} - -# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties -$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl -if (!$distributionUrl) { - Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" -} - -switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { - "maven-mvnd-*" { - $USE_MVND = $true - $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" - $MVN_CMD = "mvnd.cmd" - break - } - default { - $USE_MVND = $false - $MVN_CMD = $script -replace '^mvnw','mvn' - break - } -} - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -if ($env:MVNW_REPOURL) { - $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } - $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" -} -$distributionUrlName = $distributionUrl -replace '^.*/','' -$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' -$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" -if ($env:MAVEN_USER_HOME) { - $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" -} -$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' -$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" - -if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { - Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" - Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" - exit $? -} - -if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { - Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" -} - -# prepare tmp dir -$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile -$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" -$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null -trap { - if ($TMP_DOWNLOAD_DIR.Exists) { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } - } -} - -New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null - -# Download and Install Apache Maven -Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -Write-Verbose "Downloading from: $distributionUrl" -Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -$webclient = New-Object System.Net.WebClient -if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { - $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) -} -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum -if ($distributionSha256Sum) { - if ($USE_MVND) { - Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." - } - Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash - if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { - Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." - } -} - -# unzip and move -Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null -Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null -try { - Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null -} catch { - if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { - Write-Error "fail to move MAVEN_HOME" - } -} finally { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } -} - -Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/plugins/cms/pom.xml b/plugins/cms/pom.xml deleted file mode 100644 index 493652118f..0000000000 --- a/plugins/cms/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.bytedesk - plugins - ${revision} - - - bytedesk-plugin-cms - ${revision} - - bytedesk-plugin-cms - https://ai.bytedesk.com - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/cms/readme.md b/plugins/cms/readme.md deleted file mode 100644 index f589041fca..0000000000 --- a/plugins/cms/readme.md +++ /dev/null @@ -1,4 +0,0 @@ -# cms 内容管理系统 - -- 统一门户网站搭建 -- 内容管理系统 diff --git a/plugins/cms/src/main/java/com/bytedesk/cms/CmsApplication.java b/plugins/cms/src/main/java/com/bytedesk/cms/CmsApplication.java deleted file mode 100644 index 6fbd132de0..0000000000 --- a/plugins/cms/src/main/java/com/bytedesk/cms/CmsApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.bytedesk.cms; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class CmsApplication { - - public static void main(String[] args) { - SpringApplication.run(CmsApplication.class, args); - } - -} diff --git a/plugins/cms/src/main/resources/application.properties b/plugins/cms/src/main/resources/application.properties deleted file mode 100644 index a0e22037c6..0000000000 --- a/plugins/cms/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=cms diff --git a/plugins/cms/src/test/java/com/bytedesk/cms/CmsApplicationTests.java b/plugins/cms/src/test/java/com/bytedesk/cms/CmsApplicationTests.java deleted file mode 100644 index 5594f295eb..0000000000 --- a/plugins/cms/src/test/java/com/bytedesk/cms/CmsApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.bytedesk.cms; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class CmsApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/plugins/crm/.gitattributes b/plugins/crm/.gitattributes deleted file mode 100644 index 3b41682ac5..0000000000 --- a/plugins/crm/.gitattributes +++ /dev/null @@ -1,2 +0,0 @@ -/mvnw text eol=lf -*.cmd text eol=crlf diff --git a/plugins/crm/.mvn/wrapper/maven-wrapper.properties b/plugins/crm/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 44f3cf2c18..0000000000 --- a/plugins/crm/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip diff --git a/plugins/crm/mvnw b/plugins/crm/mvnw deleted file mode 100755 index e9cf8d3307..0000000000 --- a/plugins/crm/mvnw +++ /dev/null @@ -1,295 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.3 -# -# Optional ENV vars -# ----------------- -# JAVA_HOME - location of a JDK home dir, required when download maven via java source -# MVNW_REPOURL - repo url base for downloading maven distribution -# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output -# ---------------------------------------------------------------------------- - -set -euf -[ "${MVNW_VERBOSE-}" != debug ] || set -x - -# OS specific support. -native_path() { printf %s\\n "$1"; } -case "$(uname)" in -CYGWIN* | MINGW*) - [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" - native_path() { cygpath --path --windows "$1"; } - ;; -esac - -# set JAVACMD and JAVACCMD -set_java_home() { - # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched - if [ -n "${JAVA_HOME-}" ]; then - if [ -x "$JAVA_HOME/jre/sh/java" ]; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - JAVACCMD="$JAVA_HOME/jre/sh/javac" - else - JAVACMD="$JAVA_HOME/bin/java" - JAVACCMD="$JAVA_HOME/bin/javac" - - if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then - echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 - echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 - return 1 - fi - fi - else - JAVACMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v java - )" || : - JAVACCMD="$( - 'set' +e - 'unset' -f command 2>/dev/null - 'command' -v javac - )" || : - - if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then - echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 - return 1 - fi - fi -} - -# hash string like Java String::hashCode -hash_string() { - str="${1:-}" h=0 - while [ -n "$str" ]; do - char="${str%"${str#?}"}" - h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) - str="${str#?}" - done - printf %x\\n $h -} - -verbose() { :; } -[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } - -die() { - printf %s\\n "$1" >&2 - exit 1 -} - -trim() { - # MWRAPPER-139: - # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. - # Needed for removing poorly interpreted newline sequences when running in more - # exotic environments such as mingw bash on Windows. - printf "%s" "${1}" | tr -d '[:space:]' -} - -scriptDir="$(dirname "$0")" -scriptName="$(basename "$0")" - -# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties -while IFS="=" read -r key value; do - case "${key-}" in - distributionUrl) distributionUrl=$(trim "${value-}") ;; - distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; - esac -done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" -[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" - -case "${distributionUrl##*/}" in -maven-mvnd-*bin.*) - MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ - case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in - *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; - :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; - :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; - :Linux*x86_64*) distributionPlatform=linux-amd64 ;; - *) - echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 - distributionPlatform=linux-amd64 - ;; - esac - distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" - ;; -maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; -*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; -esac - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" -distributionUrlName="${distributionUrl##*/}" -distributionUrlNameMain="${distributionUrlName%.*}" -distributionUrlNameMain="${distributionUrlNameMain%-bin}" -MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" -MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" - -exec_maven() { - unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : - exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" -} - -if [ -d "$MAVEN_HOME" ]; then - verbose "found existing MAVEN_HOME at $MAVEN_HOME" - exec_maven "$@" -fi - -case "${distributionUrl-}" in -*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; -*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; -esac - -# prepare tmp dir -if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then - clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } - trap clean HUP INT TERM EXIT -else - die "cannot create temp dir" -fi - -mkdir -p -- "${MAVEN_HOME%/*}" - -# Download and Install Apache Maven -verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -verbose "Downloading from: $distributionUrl" -verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -# select .zip or .tar.gz -if ! command -v unzip >/dev/null; then - distributionUrl="${distributionUrl%.zip}.tar.gz" - distributionUrlName="${distributionUrl##*/}" -fi - -# verbose opt -__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' -[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v - -# normalize http auth -case "${MVNW_PASSWORD:+has-password}" in -'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; -has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; -esac - -if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then - verbose "Found wget ... using wget" - wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" -elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then - verbose "Found curl ... using curl" - curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" -elif set_java_home; then - verbose "Falling back to use Java to download" - javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" - targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" - cat >"$javaSource" <<-END - public class Downloader extends java.net.Authenticator - { - protected java.net.PasswordAuthentication getPasswordAuthentication() - { - return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); - } - public static void main( String[] args ) throws Exception - { - setDefault( new Downloader() ); - java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); - } - } - END - # For Cygwin/MinGW, switch paths to Windows format before running javac and java - verbose " - Compiling Downloader.java ..." - "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" - verbose " - Running Downloader.java ..." - "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" -fi - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -if [ -n "${distributionSha256Sum-}" ]; then - distributionSha256Result=false - if [ "$MVN_CMD" = mvnd.sh ]; then - echo "Checksum validation is not supported for maven-mvnd." >&2 - echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - elif command -v sha256sum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then - distributionSha256Result=true - fi - elif command -v shasum >/dev/null; then - if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then - distributionSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 - echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 - exit 1 - fi - if [ $distributionSha256Result = false ]; then - echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 - echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 - exit 1 - fi -fi - -# unzip and move -if command -v unzip >/dev/null; then - unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" -else - tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" -fi - -# Find the actual extracted directory name (handles snapshots where filename != directory name) -actualDistributionDir="" - -# First try the expected directory name (for regular distributions) -if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then - if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then - actualDistributionDir="$distributionUrlNameMain" - fi -fi - -# If not found, search for any directory with the Maven executable (for snapshots) -if [ -z "$actualDistributionDir" ]; then - # enable globbing to iterate over items - set +f - for dir in "$TMP_DOWNLOAD_DIR"/*; do - if [ -d "$dir" ]; then - if [ -f "$dir/bin/$MVN_CMD" ]; then - actualDistributionDir="$(basename "$dir")" - break - fi - fi - done - set -f -fi - -if [ -z "$actualDistributionDir" ]; then - verbose "Contents of $TMP_DOWNLOAD_DIR:" - verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" - die "Could not find Maven distribution directory in extracted archive" -fi - -verbose "Found extracted Maven distribution directory: $actualDistributionDir" -printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" -mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" - -clean || : -exec_maven "$@" diff --git a/plugins/crm/mvnw.cmd b/plugins/crm/mvnw.cmd deleted file mode 100644 index 2e2dbe0396..0000000000 --- a/plugins/crm/mvnw.cmd +++ /dev/null @@ -1,189 +0,0 @@ -<# : batch portion -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.3 -@REM -@REM Optional ENV vars -@REM MVNW_REPOURL - repo url base for downloading maven distribution -@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven -@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output -@REM ---------------------------------------------------------------------------- - -@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) -@SET __MVNW_CMD__= -@SET __MVNW_ERROR__= -@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% -@SET PSModulePath= -@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( - IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) -) -@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% -@SET __MVNW_PSMODULEP_SAVE= -@SET __MVNW_ARG0_NAME__= -@SET MVNW_USERNAME= -@SET MVNW_PASSWORD= -@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) -@echo Cannot start maven from wrapper >&2 && exit /b 1 -@GOTO :EOF -: end batch / begin powershell #> - -$ErrorActionPreference = "Stop" -if ($env:MVNW_VERBOSE -eq "true") { - $VerbosePreference = "Continue" -} - -# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties -$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl -if (!$distributionUrl) { - Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" -} - -switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { - "maven-mvnd-*" { - $USE_MVND = $true - $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" - $MVN_CMD = "mvnd.cmd" - break - } - default { - $USE_MVND = $false - $MVN_CMD = $script -replace '^mvnw','mvn' - break - } -} - -# apply MVNW_REPOURL and calculate MAVEN_HOME -# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ -if ($env:MVNW_REPOURL) { - $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } - $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" -} -$distributionUrlName = $distributionUrl -replace '^.*/','' -$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' - -$MAVEN_M2_PATH = "$HOME/.m2" -if ($env:MAVEN_USER_HOME) { - $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" -} - -if (-not (Test-Path -Path $MAVEN_M2_PATH)) { - New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null -} - -$MAVEN_WRAPPER_DISTS = $null -if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { - $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" -} else { - $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" -} - -$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" -$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' -$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" - -if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { - Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" - Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" - exit $? -} - -if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { - Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" -} - -# prepare tmp dir -$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile -$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" -$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null -trap { - if ($TMP_DOWNLOAD_DIR.Exists) { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } - } -} - -New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null - -# Download and Install Apache Maven -Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." -Write-Verbose "Downloading from: $distributionUrl" -Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" - -$webclient = New-Object System.Net.WebClient -if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { - $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) -} -[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 -$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null - -# If specified, validate the SHA-256 sum of the Maven distribution zip file -$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum -if ($distributionSha256Sum) { - if ($USE_MVND) { - Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." - } - Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash - if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { - Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." - } -} - -# unzip and move -Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null - -# Find the actual extracted directory name (handles snapshots where filename != directory name) -$actualDistributionDir = "" - -# First try the expected directory name (for regular distributions) -$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" -$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" -if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { - $actualDistributionDir = $distributionUrlNameMain -} - -# If not found, search for any directory with the Maven executable (for snapshots) -if (!$actualDistributionDir) { - Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { - $testPath = Join-Path $_.FullName "bin/$MVN_CMD" - if (Test-Path -Path $testPath -PathType Leaf) { - $actualDistributionDir = $_.Name - } - } -} - -if (!$actualDistributionDir) { - Write-Error "Could not find Maven distribution directory in extracted archive" -} - -Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" -Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null -try { - Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null -} catch { - if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { - Write-Error "fail to move MAVEN_HOME" - } -} finally { - try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } - catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } -} - -Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/plugins/crm/pom.xml b/plugins/crm/pom.xml deleted file mode 100644 index 01f2883970..0000000000 --- a/plugins/crm/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.bytedesk - plugins - ${revision} - - - bytedesk-plugin-crm - ${revision} - - bytedesk-plugin-crm - https://ai.bytedesk.com - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/crm/src/main/java/com/bytedesk/crm/CrmApplication.java b/plugins/crm/src/main/java/com/bytedesk/crm/CrmApplication.java deleted file mode 100644 index 82b661b009..0000000000 --- a/plugins/crm/src/main/java/com/bytedesk/crm/CrmApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.bytedesk.crm; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class CrmApplication { - - public static void main(String[] args) { - SpringApplication.run(CrmApplication.class, args); - } - -} diff --git a/plugins/crm/src/main/resources/application.properties b/plugins/crm/src/main/resources/application.properties deleted file mode 100644 index 68e05c9f2f..0000000000 --- a/plugins/crm/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=crm diff --git a/plugins/crm/src/test/java/com/bytedesk/crm/CrmApplicationTests.java b/plugins/crm/src/test/java/com/bytedesk/crm/CrmApplicationTests.java deleted file mode 100644 index a25d266a84..0000000000 --- a/plugins/crm/src/test/java/com/bytedesk/crm/CrmApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.bytedesk.crm; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class CrmApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/plugins/eam/.mvn/wrapper/maven-wrapper.jar b/plugins/eam/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 21653b6b6a..0000000000 --- a/plugins/eam/.mvn/wrapper/maven-wrapper.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e63a53cfb9c4d291ebe3c2b0edacb7622bbc480326beaa5a0456e412f52f066a -size 62547 diff --git a/plugins/eam/.mvn/wrapper/maven-wrapper.properties b/plugins/eam/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index e70e7bc8d6..0000000000 --- a/plugins/eam/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/plugins/eam/mvnw b/plugins/eam/mvnw deleted file mode 100755 index 66df285428..0000000000 --- a/plugins/eam/mvnw +++ /dev/null @@ -1,308 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.2.0 -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /usr/local/etc/mavenrc ] ; then - . /usr/local/etc/mavenrc - fi - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "$(uname)" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME - else - JAVA_HOME="/Library/Java/Home"; export JAVA_HOME - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=$(java-config --jre-home) - fi -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --unix "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --unix "$CLASSPATH") -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && - JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="$(which javac)" - if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=$(which readlink) - if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then - if $darwin ; then - javaHome="$(dirname "\"$javaExecutable\"")" - javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" - else - javaExecutable="$(readlink -f "\"$javaExecutable\"")" - fi - javaHome="$(dirname "\"$javaExecutable\"")" - javaHome=$(expr "$javaHome" : '\(.*\)/bin') - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=$(cd "$wdir/.." || exit 1; pwd) - fi - # end of workaround - done - printf '%s' "$(cd "$basedir" || exit 1; pwd)" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - # Remove \r in case we run on Windows within Git Bash - # and check out the repository with auto CRLF management - # enabled. Otherwise, we may read lines that are delimited with - # \r\n and produce $'-Xarg\r' rather than -Xarg due to word - # splitting rules. - tr -s '\r\n' ' ' < "$1" - fi -} - -log() { - if [ "$MVNW_VERBOSE" = true ]; then - printf '%s\n' "$1" - fi -} - -BASE_DIR=$(find_maven_basedir "$(dirname "$0")") -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -log "$MAVEN_PROJECTBASEDIR" - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" -if [ -r "$wrapperJarPath" ]; then - log "Found $wrapperJarPath" -else - log "Couldn't find $wrapperJarPath, downloading it ..." - - if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - fi - while IFS="=" read -r key value; do - # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) - safeValue=$(echo "$value" | tr -d '\r') - case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; - esac - done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" - log "Downloading from: $wrapperUrl" - - if $cygwin; then - wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") - fi - - if command -v wget > /dev/null; then - log "Found wget ... using wget" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - log "Found curl ... using curl" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - fi - else - log "Falling back to using Java to download" - javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaSource=$(cygpath --path --windows "$javaSource") - javaClass=$(cygpath --path --windows "$javaClass") - fi - if [ -e "$javaSource" ]; then - if [ ! -e "$javaClass" ]; then - log " - Compiling MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/javac" "$javaSource") - fi - if [ -e "$javaClass" ]; then - log " - Running MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -# If specified, validate the SHA-256 sum of the Maven wrapper jar file -wrapperSha256Sum="" -while IFS="=" read -r key value; do - case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; - esac -done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" -if [ -n "$wrapperSha256Sum" ]; then - wrapperSha256Result=false - if command -v sha256sum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - elif command -v shasum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." - echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." - exit 1 - fi - if [ $wrapperSha256Result = false ]; then - echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 - echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 - echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 - exit 1 - fi -fi - -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --windows "$CLASSPATH") - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -# shellcheck disable=SC2086 # safe args -exec "$JAVACMD" \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/plugins/eam/mvnw.cmd b/plugins/eam/mvnw.cmd deleted file mode 100644 index 95ba6f54ac..0000000000 --- a/plugins/eam/mvnw.cmd +++ /dev/null @@ -1,205 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.2.0 -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* -if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %WRAPPER_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file -SET WRAPPER_SHA_256_SUM="" -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B -) -IF NOT %WRAPPER_SHA_256_SUM%=="" ( - powershell -Command "&{"^ - "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ - "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ - " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ - " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ - " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ - " exit 1;"^ - "}"^ - "}" - if ERRORLEVEL 1 goto error -) - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% ^ - %JVM_CONFIG_MAVEN_PROPS% ^ - %MAVEN_OPTS% ^ - %MAVEN_DEBUG_OPTS% ^ - -classpath %WRAPPER_JAR% ^ - "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ - %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" -if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%"=="on" pause - -if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% - -cmd /C exit /B %ERROR_CODE% diff --git a/plugins/eam/pom.xml b/plugins/eam/pom.xml deleted file mode 100644 index 1624a5dff5..0000000000 --- a/plugins/eam/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.bytedesk - plugins - ${revision} - - - bytedesk-plugin-eam - ${revision} - - bytedesk-plugin-eam - https://ai.bytedesk.com - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/eam/readme.md b/plugins/eam/readme.md deleted file mode 100644 index 1c32348540..0000000000 --- a/plugins/eam/readme.md +++ /dev/null @@ -1,16 +0,0 @@ - -# eam - -- Enterprise Asset Management diff --git a/plugins/eam/readme.zh.md b/plugins/eam/readme.zh.md deleted file mode 100644 index c71444dc09..0000000000 --- a/plugins/eam/readme.zh.md +++ /dev/null @@ -1,109 +0,0 @@ - -# EAM - -- 企业资产管理(Enterprise Asset Management) - -## 系统目标 - -EAM系统旨在优化企业资产全生命周期管理,提高资产利用率,降低维护成本,延长资产使用寿命,为企业决策提供数据支持。 - -## 功能模块设计 - -### 1. 资产基础管理 - -- **资产登记与分类**:建立统一资产编码体系,支持多层级分类结构 -- **资产信息维护**:基础信息、技术参数、财务信息、使用状态等全方位记录 -- **资产状态跟踪**:在用、闲置、报废、维修等状态管理 -- **资产关系管理**:支持父子关系、依赖关系、组合关系等复杂资产关系 -- **资产标签管理**:条码/RFID标签生成与打印,移动端扫描识别 - -### 2. 资产生命周期管理 - -- **资产计划与预算**:年度资产增添计划,预算编制与控制 -- **资产采购管理**:采购申请、审批、订单跟踪、到货验收 -- **资产调拨与转移**:跨部门/地点资产调拨,过程追踪与确认 -- **资产处置管理**:闲置管理、报废申请、处置方案审批、回收利用 -- **资产折旧计算**:支持多种折旧方法,自动计算与记账 - -### 3. 维修与保养管理 - -- **维护计划管理**:预防性维护计划制定与执行监控 -- **故障报修管理**:故障申报、分派、处理、结案全流程 -- **点检管理**:设备定期点检计划、执行记录与异常处理 -- **备件管理**:备件库存、采购、领用与消耗统计 -- **维修分析**:故障分类分析,维修效率与成本分析 - -### 4. 运营与绩效管理 - -- **资产利用率监控**:设备运行时间记录,利用率统计与分析 -- **能耗管理**:能源消耗监控,能效分析与优化 -- **运行成本分析**:运行、维护、备件等综合成本分析 -- **KPI指标体系**:设备综合效率(OEE)、平均故障间隔时间(MTBF)、平均修复时间(MTTR)等 -- **绩效评估**:资产与维护团队绩效评估 - -### 5. 供应商与合同管理 - -- **供应商信息管理**:供应商资质、业务范围、联系方式等 -- **合同管理**:购买合同、维护合同、租赁合同等全生命周期管理 -- **供应商评估**:供应商产品质量、服务质量、响应速度等评估 -- **保修期管理**:保修期限跟踪,到期提醒与续保管理 - -### 6. 智能分析与决策支持 - -- **资产健康度评估**:基于运行状态、故障频率等的健康度模型 -- **预测性维护**:基于数据分析的故障预测与提前干预 -- **更新改造决策**:基于成本效益分析的设备更新决策支持 -- **投资回报分析**:资产投资ROI分析,辅助投资决策 -- **风险评估**:资产关键性分析,风险识别与管控 - -### 7. 系统集成与数据互通 - -- **财务系统集成**:与财务系统对接,资产价值、折旧同步 -- **人力资源系统集成**:与HR系统对接,人员权限与责任关联 -- **物联网数据采集**:支持设备运行参数实时采集与监控 -- **移动应用支持**:现场作业APP,支持离线操作与数据同步 -- **数据导入导出**:多格式数据交换,支持批量处理 - -### 8. 系统管理与安全 - -- **用户权限管理**:基于角色的访问控制,细粒度权限设置 -- **组织架构管理**:多级组织结构配置,支持跨部门协作 -- **工作流配置**:可定制的审批流程,满足不同业务场景 -- **系统日志审计**:操作日志记录与审计,确保数据安全 -- **数据备份恢复**:自动备份与恢复机制,保障数据安全 - -## 系统架构 - -- **前端**:响应式Web界面 + 移动应用 -- **中间层**:微服务架构,支持模块化部署与扩展 -- **数据层**:关系型数据库 + 时序数据库(存储设备运行参数) -- **集成层**:API网关,支持与第三方系统集成 -- **物联网层**:传感器数据采集与处理 - -## 实施路线图 - -1. **基础阶段**:资产基础信息管理,基本维修管理 -2. **提升阶段**:预防性维护,备件管理,基础报表 -3. **优化阶段**:资产绩效管理,供应商管理,高级分析 -4. **创新阶段**:预测性维护,智能决策支持,物联网集成 - -## 预期收益 - -- 延长资产使用寿命15-20% -- 降低维护成本10-15% -- 减少计划外停机时间30-40% -- 提高设备可用性5-10% -- 优化备件库存,降低库存成本20-25% -- 提升维护人员工作效率15-20% diff --git a/plugins/eam/src/main/java/com/bytedesk/eam/EamApplication.java b/plugins/eam/src/main/java/com/bytedesk/eam/EamApplication.java deleted file mode 100644 index ee91542860..0000000000 --- a/plugins/eam/src/main/java/com/bytedesk/eam/EamApplication.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2025-03-24 12:06:11 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.eam; - -// import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class EamApplication { - - // public static void main(String[] args) { - // SpringApplication.run(AmazonApplication.class, args); - // } - -} diff --git a/plugins/eam/src/main/resources/application.properties b/plugins/eam/src/main/resources/application.properties deleted file mode 100644 index b36966289c..0000000000 --- a/plugins/eam/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=eam diff --git a/plugins/eam/src/test/java/com/bytedesk/eam/EamApplicationTests.java b/plugins/eam/src/test/java/com/bytedesk/eam/EamApplicationTests.java deleted file mode 100644 index e4ddadd126..0000000000 --- a/plugins/eam/src/test/java/com/bytedesk/eam/EamApplicationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2024-12-09 10:07:00 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.eam; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class EamApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/plugins/erp/.mvn/wrapper/maven-wrapper.jar b/plugins/erp/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 21653b6b6a..0000000000 --- a/plugins/erp/.mvn/wrapper/maven-wrapper.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e63a53cfb9c4d291ebe3c2b0edacb7622bbc480326beaa5a0456e412f52f066a -size 62547 diff --git a/plugins/erp/.mvn/wrapper/maven-wrapper.properties b/plugins/erp/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index e70e7bc8d6..0000000000 --- a/plugins/erp/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/plugins/erp/mvnw b/plugins/erp/mvnw deleted file mode 100755 index 66df285428..0000000000 --- a/plugins/erp/mvnw +++ /dev/null @@ -1,308 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.2.0 -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /usr/local/etc/mavenrc ] ; then - . /usr/local/etc/mavenrc - fi - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "$(uname)" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME - else - JAVA_HOME="/Library/Java/Home"; export JAVA_HOME - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=$(java-config --jre-home) - fi -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --unix "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --unix "$CLASSPATH") -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && - JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="$(which javac)" - if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=$(which readlink) - if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then - if $darwin ; then - javaHome="$(dirname "\"$javaExecutable\"")" - javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" - else - javaExecutable="$(readlink -f "\"$javaExecutable\"")" - fi - javaHome="$(dirname "\"$javaExecutable\"")" - javaHome=$(expr "$javaHome" : '\(.*\)/bin') - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=$(cd "$wdir/.." || exit 1; pwd) - fi - # end of workaround - done - printf '%s' "$(cd "$basedir" || exit 1; pwd)" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - # Remove \r in case we run on Windows within Git Bash - # and check out the repository with auto CRLF management - # enabled. Otherwise, we may read lines that are delimited with - # \r\n and produce $'-Xarg\r' rather than -Xarg due to word - # splitting rules. - tr -s '\r\n' ' ' < "$1" - fi -} - -log() { - if [ "$MVNW_VERBOSE" = true ]; then - printf '%s\n' "$1" - fi -} - -BASE_DIR=$(find_maven_basedir "$(dirname "$0")") -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -log "$MAVEN_PROJECTBASEDIR" - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" -if [ -r "$wrapperJarPath" ]; then - log "Found $wrapperJarPath" -else - log "Couldn't find $wrapperJarPath, downloading it ..." - - if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - fi - while IFS="=" read -r key value; do - # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) - safeValue=$(echo "$value" | tr -d '\r') - case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; - esac - done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" - log "Downloading from: $wrapperUrl" - - if $cygwin; then - wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") - fi - - if command -v wget > /dev/null; then - log "Found wget ... using wget" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - log "Found curl ... using curl" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - fi - else - log "Falling back to using Java to download" - javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaSource=$(cygpath --path --windows "$javaSource") - javaClass=$(cygpath --path --windows "$javaClass") - fi - if [ -e "$javaSource" ]; then - if [ ! -e "$javaClass" ]; then - log " - Compiling MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/javac" "$javaSource") - fi - if [ -e "$javaClass" ]; then - log " - Running MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -# If specified, validate the SHA-256 sum of the Maven wrapper jar file -wrapperSha256Sum="" -while IFS="=" read -r key value; do - case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; - esac -done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" -if [ -n "$wrapperSha256Sum" ]; then - wrapperSha256Result=false - if command -v sha256sum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - elif command -v shasum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." - echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." - exit 1 - fi - if [ $wrapperSha256Result = false ]; then - echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 - echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 - echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 - exit 1 - fi -fi - -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --windows "$CLASSPATH") - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -# shellcheck disable=SC2086 # safe args -exec "$JAVACMD" \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/plugins/erp/mvnw.cmd b/plugins/erp/mvnw.cmd deleted file mode 100644 index 95ba6f54ac..0000000000 --- a/plugins/erp/mvnw.cmd +++ /dev/null @@ -1,205 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.2.0 -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* -if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %WRAPPER_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file -SET WRAPPER_SHA_256_SUM="" -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B -) -IF NOT %WRAPPER_SHA_256_SUM%=="" ( - powershell -Command "&{"^ - "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ - "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ - " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ - " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ - " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ - " exit 1;"^ - "}"^ - "}" - if ERRORLEVEL 1 goto error -) - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% ^ - %JVM_CONFIG_MAVEN_PROPS% ^ - %MAVEN_OPTS% ^ - %MAVEN_DEBUG_OPTS% ^ - -classpath %WRAPPER_JAR% ^ - "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ - %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" -if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%"=="on" pause - -if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% - -cmd /C exit /B %ERROR_CODE% diff --git a/plugins/erp/pom.xml b/plugins/erp/pom.xml deleted file mode 100644 index 4b069b38f9..0000000000 --- a/plugins/erp/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.bytedesk - plugins - ${revision} - - - bytedesk-plugin-erp - ${revision} - - bytedesk-plugin-erp - https://ai.bytedesk.com - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/erp/readme.md b/plugins/erp/readme.md deleted file mode 100644 index 093d4079fb..0000000000 --- a/plugins/erp/readme.md +++ /dev/null @@ -1,14 +0,0 @@ - -# erp diff --git a/plugins/erp/readme.zh.md b/plugins/erp/readme.zh.md deleted file mode 100644 index 32db389092..0000000000 --- a/plugins/erp/readme.zh.md +++ /dev/null @@ -1,14 +0,0 @@ - -# ERP diff --git a/plugins/erp/src/main/java/com/bytedesk/erp/ErpApplication.java b/plugins/erp/src/main/java/com/bytedesk/erp/ErpApplication.java deleted file mode 100644 index c0b92ac182..0000000000 --- a/plugins/erp/src/main/java/com/bytedesk/erp/ErpApplication.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2025-07-24 06:26:09 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.erp; - -// import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class ErpApplication { - - // public static void main(String[] args) { - // SpringApplication.run(ErpApplication.class, args); - // } - -} diff --git a/plugins/erp/src/main/resources/application.properties b/plugins/erp/src/main/resources/application.properties deleted file mode 100644 index 897243df32..0000000000 --- a/plugins/erp/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=erp diff --git a/plugins/erp/src/test/java/com/bytedesk/erp/ErpApplicationTests.java b/plugins/erp/src/test/java/com/bytedesk/erp/ErpApplicationTests.java deleted file mode 100644 index 4b0425c600..0000000000 --- a/plugins/erp/src/test/java/com/bytedesk/erp/ErpApplicationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2025-07-23 17:41:47 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.erp; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class ErpApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/plugins/freeswitch/.mvn/wrapper/maven-wrapper.jar b/plugins/freeswitch/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 21653b6b6a..0000000000 --- a/plugins/freeswitch/.mvn/wrapper/maven-wrapper.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e63a53cfb9c4d291ebe3c2b0edacb7622bbc480326beaa5a0456e412f52f066a -size 62547 diff --git a/plugins/freeswitch/.mvn/wrapper/maven-wrapper.properties b/plugins/freeswitch/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index e70e7bc8d6..0000000000 --- a/plugins/freeswitch/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/plugins/freeswitch/FREESWITCH_ESL_FIX_GUIDE.md b/plugins/freeswitch/FREESWITCH_ESL_FIX_GUIDE.md deleted file mode 100644 index 34fc5a4546..0000000000 --- a/plugins/freeswitch/FREESWITCH_ESL_FIX_GUIDE.md +++ /dev/null @@ -1,145 +0,0 @@ -# FreeSwitch ESL 连接问题修复指南 - -## 问题描述 - -Java应用程序连接FreeSwitch ESL时收到 "text/rude-rejection" 和 "Access Denied, go away" 错误。 - -## 根本原因 - -FreeSwitch的Event Socket Library (ESL)配置中的访问控制列表(ACL)限制了外部连接。 - -## 修复方案 - -### 方案1: 修改ESL配置允许特定IP (推荐) - -1. **备份原配置文件** - -```bash -cp /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml.backup -cp /usr/local/freeswitch/conf/autoload_configs/acl.conf.xml /usr/local/freeswitch/conf/autoload_configs/acl.conf.xml.backup -``` - -2. **修改event_socket.conf.xml** - -```xml - - - - - - - - - - - -``` - -3. **修改acl.conf.xml,添加自定义ACL** - -```xml - - - - - - - - - - - - - -``` - -### 方案2: 临时解决方案 - 移除ACL限制 (不推荐用于生产环境) - -修改event_socket.conf.xml: - -```xml - - - - - - - - - - - - -``` - -### 方案3: 使用SSH隧道 (最安全) - -1. **建立SSH隧道** - -```bash -ssh -L 8021:localhost:8021 user@14.103.165.199 -``` - -2. **修改Java应用配置连接到本地** - -```properties -bytedesk.freeswitch.server=127.0.0.1 -bytedesk.freeswitch.esl-port=8021 -``` - -## 重启FreeSwitch服务 - -修改配置后需要重启FreeSwitch: - -```bash -# 方法1: 重启系统服务 -sudo systemctl restart freeswitch - -# 方法2: 重新加载配置 (如果FreeSwitch正在运行) -fs_cli -x "reloadxml" - -# 方法3: 只重载ESL模块 -fs_cli -x "reload mod_event_socket" -``` - -## 验证修复 - -1. **测试端口连接** - -```bash -telnet 14.103.165.199 8021 -``` - -2. **检查FreeSwitch日志** - -```bash -tail -f /usr/local/freeswitch/log/freeswitch.log -``` - -3. **使用fs_cli测试** - -```bash -fs_cli -H 14.103.165.199 -P 8021 -p bytedesk123 -``` - -## 安全建议 - -1. **使用强密码**: 确保ESL密码足够复杂 -2. **限制IP访问**: 只允许需要的IP地址访问 -3. **使用防火墙**: 在服务器级别限制8021端口访问 -4. **监控日志**: 定期检查连接日志发现异常访问 -5. **使用SSL**: 考虑配置ESL over SSL (需要FreeSwitch支持) - -## 当前配置状态 - -- 服务器: 14.103.165.199 -- ESL端口: 8021 -- ESL密码: bytedesk123 -- 问题: ACL拒绝外部连接 - -## 相关文件 - -- ESL配置: `/usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml` -- ACL配置: `/usr/local/freeswitch/conf/autoload_configs/acl.conf.xml` -- 日志文件: `/usr/local/freeswitch/log/freeswitch.log` -- 应用配置: `application-local.properties` diff --git a/plugins/freeswitch/IMMEDIATE_FIX_COMMANDS.md b/plugins/freeswitch/IMMEDIATE_FIX_COMMANDS.md deleted file mode 100644 index d8907c7cd3..0000000000 --- a/plugins/freeswitch/IMMEDIATE_FIX_COMMANDS.md +++ /dev/null @@ -1,92 +0,0 @@ -# 🚨 FreeSwitch ESL 立即修复指令 - -## 当前状态确认 ✅ -- 网络连通性:正常 -- 端口8021:可访问 -- ESL响应:仍然是 "text/rude-rejection" - -## 🔧 需要在服务器上执行的修复命令 - -**请在FreeSwitch服务器 (14.103.165.199) 上以root权限执行以下命令:** - -### 1. 快速修复(一行命令) - -```bash -# 一键修复ESL配置 -cp /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml.backup.$(date +%Y%m%d) && cat > /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml << 'EOF' - - - - - - - - -EOF -systemctl restart freeswitch -``` - -### 2. 分步执行(如果需要详细控制) - -```bash -# 步骤1: 备份原配置 -cp /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml.backup - -# 步骤2: 创建新配置 -cat > /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml << 'EOF' - - - - - - - - -EOF - -# 步骤3: 重启FreeSwitch -systemctl restart freeswitch -``` - -### 3. 验证修复 - -```bash -# 检查服务状态 -systemctl status freeswitch - -# 检查端口监听 -netstat -tlnp | grep :8021 - -# 测试ESL连接 -echo "" | nc localhost 8021 -``` - -**预期结果:应该看到 "Content-Type: auth/request" 而不是 "rude-rejection"** - -## 🔍 如果还有问题 - -1. **检查配置文件位置:** - ```bash - find /etc /usr/local /opt /var -name "event_socket.conf.xml" -type f 2>/dev/null - ``` - -2. **查看FreeSwitch日志:** - ```bash - tail -20 /usr/local/freeswitch/log/freeswitch.log - ``` - -3. **检查其他可能的配置文件:** - ```bash - grep -r "apply-inbound-acl" /usr/local/freeswitch/conf/ 2>/dev/null - ``` - -## 📞 联系信息 - -如果需要技术支持,请提供以下信息: -- 执行命令后的输出结果 -- FreeSwitch日志的最后20行 -- 配置文件的实际位置 - ---- - -**⚠️ 注意:这个配置移除了所有ACL限制,仅用于解决连接问题。生产环境建议后续添加IP白名单。** diff --git a/plugins/freeswitch/MANUAL_FIX_GUIDE.md b/plugins/freeswitch/MANUAL_FIX_GUIDE.md deleted file mode 100644 index 391bb23f4e..0000000000 --- a/plugins/freeswitch/MANUAL_FIX_GUIDE.md +++ /dev/null @@ -1,239 +0,0 @@ -# FreeSwitch ESL 手动修复指南 - -## 🚨 紧急修复 - 解决 rude-rejection 问题 - -**当前状态**: 配置已修改但未生效 -**目标**: 让FreeSwitch接受外部ESL连接 - ---- - -## 步骤1: 连接到FreeSwitch服务器 - -```bash -# 使用SSH连接到服务器 -ssh root@14.103.165.199 -``` - ---- - -## 步骤2: 查找实际配置文件位置 - -在服务器上执行以下命令,找出FreeSwitch实际使用的配置文件: - -```bash -# 查找所有event_socket.conf.xml文件 -find /etc /usr/local /opt /var -name "event_socket.conf.xml" -type f 2>/dev/null - -# 检查FreeSwitch进程使用的配置目录 -ps aux | grep freeswitch | grep -v grep - -# 检查FreeSwitch安装目录 -ls -la /usr/local/freeswitch/conf/autoload_configs/ | grep event_socket -ls -la /etc/freeswitch/autoload_configs/ | grep event_socket 2>/dev/null || echo "该路径不存在" -``` - ---- - -## 步骤3: 备份并修复配置 - -### A. 备份现有配置 - -```bash -# 创建备份目录 -mkdir -p /tmp/freeswitch_backup_$(date +%Y%m%d_%H%M%S) - -# 备份event_socket配置 (根据步骤2找到的实际路径调整) -cp /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml /tmp/freeswitch_backup_$(date +%Y%m%d_%H%M%S)/ -``` - -### B. 创建新的配置文件 - -**重要**: 请根据步骤2找到的实际路径替换下面的路径 - -```bash -# 创建完全无ACL限制的配置 -cat > /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml << 'EOF' - - - - - - - - - - - - - -EOF -``` - ---- - -## 步骤4: 重启FreeSwitch服务 - -### 选项A: 使用systemctl (推荐) - -```bash -# 重启FreeSwitch服务 -systemctl restart freeswitch - -# 检查服务状态 -systemctl status freeswitch - -# 等待服务完全启动 -sleep 5 -``` - -### 选项B: 使用传统service命令 - -```bash -service freeswitch restart -sleep 5 -``` - -### 选项C: 如果上面的方法都不工作 - -```bash -# 查找FreeSwitch进程 -ps aux | grep freeswitch - -# 强制杀死进程 (替换PID) -killall freeswitch - -# 手动启动 (根据实际安装路径调整) -/usr/local/freeswitch/bin/freeswitch -nc -``` - ---- - -## 步骤5: 验证修复 - -### A. 检查端口监听 - -```bash -# 检查8021端口是否在监听 -netstat -tlnp | grep :8021 -# 或者使用 -ss -tlnp | grep :8021 -``` - -### B. 本地连接测试 - -```bash -# 测试本地ESL连接 -echo "" | telnet localhost 8021 - -# 如果收到以下响应则表示成功: -# Content-Type: auth/request -``` - -### C. 远程连接测试 - -```bash -# 获取服务器IP -hostname -I - -# 测试远程连接 (从其他机器执行) -telnet YOUR_SERVER_IP 8021 -``` - ---- - -## 步骤6: 如果问题仍然存在 - -### A. 检查FreeSwitch日志 - -```bash -# 实时查看FreeSwitch日志 -tail -f /usr/local/freeswitch/log/freeswitch.log - -# 查看最近的错误 -grep -i "event_socket\|acl\|denied" /usr/local/freeswitch/log/freeswitch.log | tail -20 -``` - -### B. 检查防火墙设置 - -```bash -# 检查iptables规则 -iptables -L -n | grep 8021 - -# 如果有防火墙阻止,临时允许8021端口 -iptables -I INPUT -p tcp --dport 8021 -j ACCEPT -``` - -### C. 检查SELinux (如果适用) - -```bash -# 检查SELinux状态 -sestatus - -# 如果启用了SELinux,临时禁用 -setenforce 0 -``` - ---- - -## 步骤7: 验证Java应用连接 - -修复完成后,在Java应用服务器上测试: - -```bash -# 测试网络连接 -telnet 14.103.165.199 8021 - -# 检查应用健康状态 -curl http://localhost:9003/actuator/health/freeSwitch - -# 测试ESL连接 -curl -X POST http://localhost:9003/api/v1/freeswitch/test-connection -``` - ---- - -## 🔒 安全提醒 - -⚠️ **当前配置移除了所有访问限制,仅用于解决连接问题** - -修复成功后,建议在生产环境中添加IP白名单: - -```xml - - - - - - - - - - - -``` - -然后在 acl.conf.xml 中添加: - -```xml - - - - -``` - ---- - -## 📞 如果需要支持 - -如果按照以上步骤仍无法解决问题,请提供: - -1. FreeSwitch版本信息 -2. 操作系统信息 -3. 配置文件实际位置 -4. FreeSwitch日志中的错误信息 - ---- - -**修复预计时间**: 5-10分钟 -**成功率**: 95%+ -**最后更新**: 2025-06-08 diff --git a/plugins/freeswitch/SOLUTION_STATUS_REPORT.md b/plugins/freeswitch/SOLUTION_STATUS_REPORT.md deleted file mode 100644 index fdbc7ee6cc..0000000000 --- a/plugins/freeswitch/SOLUTION_STATUS_REPORT.md +++ /dev/null @@ -1,153 +0,0 @@ -# FreeSwitch ESL 连接问题解决状态报告 - -## 📊 问题分析总结 - -### ✅ 已确认的情况 - -- **网络连通性**: 正常 (ping 响应时间 ~29ms) -- **端口访问**: 端口8021可访问 -- **FreeSwitch服务**: 运行中 -- **问题根因**: ACL (Access Control List) 配置限制外部连接 - -### ❌ 当前问题状态 - -- **ESL响应**: 仍然返回 "text/rude-rejection" -- **错误消息**: "Access Denied, go away." -- **Java连接**: 因ACL限制无法建立ESL连接 - -## 🛠️ 已完成的工作 - -### 1. Java端增强 ✅ - -- **智能错误诊断**: 自动识别ACL拒绝、连接超时等错误类型 -- **连接重试机制**: 指数退避策略,最多3次重试 -- **健康状态监控**: Spring Boot Actuator集成 -- **启动时诊断**: 应用启动自动检测FreeSwitch连接状态 -- **管理API**: 提供连接测试和状态查询REST接口 - -### 2. 诊断工具创建 ✅ - -- **diagnose_and_fix.sh**: 完整诊断脚本 -- **monitor_esl_status.sh**: 实时连接状态监控 -- **one_click_fix.sh**: 服务器端一键修复脚本 -- **IMMEDIATE_FIX_COMMANDS.md**: 立即修复指令 - -### 3. 配置文件准备 ✅ - -- **event_socket.conf.xml**: 已准备无ACL限制的配置 -- **修复脚本**: 包含自动备份和配置替换逻辑 - -## 🚨 待执行的关键步骤 - -### 服务器端修复 (需要SSH访问) - -**在FreeSwitch服务器 (14.103.165.199) 上执行:** - -```bash -# 一行命令修复 -cp /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml.backup && cat > /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml << 'EOF' - - - - - - - - -EOF -systemctl restart freeswitch -``` - -## 📈 预期修复结果 - -### 修复成功后的ESL响应 - -```bash -Content-Type: auth/request -Content-Length: 0 -``` - -### Java应用连接状态 - -- **健康检查**: 从 DOWN 变为 UP -- **连接测试**: API返回成功状态 -- **事件监听**: 可正常接收FreeSwitch事件 - -## 🔍 验证步骤 - -### 1. 服务器端验证 - -```bash -# 检查端口监听 -netstat -tlnp | grep :8021 - -# 测试本地连接 -echo "" | nc localhost 8021 - -# 检查服务状态 -systemctl status freeswitch -``` - -### 2. 客户端验证 - -```bash -# 运行监控脚本 -./monitor_esl_status.sh - -# 测试Java应用健康状态 -curl http://localhost:9003/actuator/health/freeSwitch - -# 测试ESL连接 -curl -X POST http://localhost:9003/api/v1/freeswitch/test-connection -``` - -## 🔒 安全考虑 - -⚠️ **当前修复方案移除了所有ACL限制,仅用于解决连接问题** - -### 生产环境建议 - -修复成功后,建议添加IP白名单配置: - -```xml - - - - - - - - - -``` - -然后在 acl.conf.xml 中添加: - -```xml - - - -``` - -## 📞 后续支持 - -### 如果修复仍然失败 - -1. 检查是否有多个配置文件 -2. 确认FreeSwitch版本和配置目录 -3. 查看详细的FreeSwitch日志 -4. 考虑使用SSH隧道作为临时方案 - -### 联系信息 - -提供以下信息以获取进一步支持: - -- 服务器修复命令的执行结果 -- FreeSwitch日志输出 -- 配置文件的实际位置和内容 - ---- - -**状态**: 等待服务器端配置修复 -**优先级**: 高 -**预计解决时间**: 执行修复命令后立即生效 diff --git a/plugins/freeswitch/URGENT_FIX_REPORT.md b/plugins/freeswitch/URGENT_FIX_REPORT.md deleted file mode 100644 index f8b8e0c06a..0000000000 --- a/plugins/freeswitch/URGENT_FIX_REPORT.md +++ /dev/null @@ -1,148 +0,0 @@ -# FreeSwitch ESL "rude-rejection" 问题诊断报告 - -## 问题摘要 - -**问题现象**: 即使修改了FreeSwitch配置文件后,Java应用连接ESL时仍然收到 `text/rude-rejection` 错误。 - -**关键发现**: -- ✅ 网络连接正常 (端口8021可达) -- ❌ FreeSwitch仍返回 "Access Denied, go away" 消息 -- 🔍 配置修改可能未生效 - -## 根本原因分析 - -### 1. 配置文件位置问题 -FreeSwitch可能从不同的路径读取配置文件: -- `/etc/freeswitch/autoload_configs/` -- `/usr/local/freeswitch/conf/autoload_configs/` -- `/opt/freeswitch/conf/autoload_configs/` - -### 2. 配置重新加载问题 -修改配置后需要: -- 重新加载 `mod_event_socket` 模块,或 -- 完全重启FreeSwitch服务 - -### 3. 可能的配置覆盖 -- 其他配置文件可能覆盖了ACL设置 -- 系统级防火墙可能在应用层面阻止连接 - -## 立即修复方案 - -### 方案A: 使用自动修复脚本 (推荐) - -1. **将修复脚本上传到服务器**: - ```bash - scp freeswitch_acl_fix.sh root@14.103.165.199:/tmp/ - ``` - -2. **在服务器上执行修复**: - ```bash - ssh root@14.103.165.199 - chmod +x /tmp/freeswitch_acl_fix.sh - sudo /tmp/freeswitch_acl_fix.sh - ``` - -### 方案B: 手动修复步骤 - -在FreeSwitch服务器 (14.103.165.199) 上执行: - -```bash -# 1. 查找实际配置文件位置 -sudo find /etc /usr/local /opt -name "event_socket.conf.xml" -type f 2>/dev/null - -# 2. 备份原配置 -sudo cp /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml /tmp/ - -# 3. 创建无ACL限制的配置 -sudo tee /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml > /dev/null << 'EOF' - - - - - - - - -EOF - -# 4. 重启FreeSwitch服务 -sudo systemctl restart freeswitch - -# 5. 等待服务启动 -sleep 5 - -# 6. 验证修复 -telnet localhost 8021 -``` - -### 方案C: 应急SSH隧道方案 - -如果服务器配置无法修改,可以使用SSH隧道: - -```bash -# 在本地执行 (Mac终端) -ssh -L 8021:localhost:8021 root@14.103.165.199 - -# 修改Java应用配置连接到本地 -bytedesk.freeswitch.server=127.0.0.1 -bytedesk.freeswitch.esl-port=8021 -``` - -## 验证修复 - -修复后使用以下方法验证: - -### 1. 网络层测试 -```bash -telnet 14.103.165.199 8021 -``` -应该收到 `auth/request` 而不是 `rude-rejection` - -### 2. Java应用测试 -```bash -# 检查健康状态 -curl http://localhost:9003/actuator/health/freeSwitch - -# 测试连接 -curl -X POST http://localhost:9003/api/v1/freeswitch/test-connection -``` - -### 3. FreeSwitch日志 -```bash -# 在服务器上检查日志 -tail -f /usr/local/freeswitch/log/freeswitch.log -``` - -## 安全注意事项 - -⚠️ **临时解决方案警告**: -- 当前修复移除了所有ACL限制 -- 生产环境应重新添加IP白名单 -- 建议使用防火墙进行额外保护 - -### 生产环境ACL配置示例 -```xml - - - - - - - - - - -``` - -## 后续监控 - -1. **设置健康检查**: 定期检查ESL连接状态 -2. **日志监控**: 监控FreeSwitch连接日志 -3. **告警配置**: 连接失败时发送告警 - ---- - -**生成时间**: 2025-06-08 14:42 -**问题状态**: 🔴 待修复 -**优先级**: 高 -**预计修复时间**: 5-10分钟 diff --git a/plugins/freeswitch/diagnose_and_fix.sh b/plugins/freeswitch/diagnose_and_fix.sh deleted file mode 100755 index 36476872a8..0000000000 --- a/plugins/freeswitch/diagnose_and_fix.sh +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/bash - -# FreeSwitch 连接诊断和修复助手 (本地执行) -# 提供详细的诊断信息和修复建议 - -echo "=======================================" -echo " FreeSwitch ESL 连接诊断助手" -echo "=======================================" -echo "诊断时间: $(date)" -echo "目标服务器: 14.103.165.199:8021" -echo "" - -# 1. 基础网络连通性测试 -echo "🔍 步骤1: 基础网络连通性测试" -echo "----------------------------------------" - -if ping -c 3 14.103.165.199 > /dev/null 2>&1; then - echo "✅ 服务器网络可达" -else - echo "❌ 服务器网络不可达" - echo " 请检查网络连接和服务器状态" - exit 1 -fi - -# 2. 端口连通性测试 -echo "" -echo "🔍 步骤2: 端口连通性测试" -echo "----------------------------------------" - -if timeout 5 bash -c "/dev/null; then - echo "✅ 端口8021可以连接" -else - echo "❌ 端口8021无法连接" - echo " 可能原因:" - echo " - FreeSwitch服务未运行" - echo " - 防火墙阻止了8021端口" - echo " - 端口配置错误" - exit 1 -fi - -# 3. ESL协议测试 -echo "" -echo "🔍 步骤3: ESL协议测试" -echo "----------------------------------------" - -RESPONSE=$(timeout 3 bash -c "echo '' | nc 14.103.165.199 8021" 2>/dev/null) - -if [[ -n "$RESPONSE" ]]; then - echo "收到FreeSwitch响应:" - echo "$RESPONSE" - echo "" - - if echo "$RESPONSE" | grep -q "rude-rejection"; then - echo "❌ 收到rude-rejection错误" - echo " 原因: FreeSwitch ACL配置阻止了连接" - echo " 需要修复服务器配置" - NEED_FIX=true - elif echo "$RESPONSE" | grep -q "auth/request"; then - echo "✅ FreeSwitch正常响应" - echo " ESL服务工作正常" - NEED_FIX=false - else - echo "⚠️ 收到未知响应" - NEED_FIX=true - fi -else - echo "❌ 未收到响应" - echo " 可能连接被立即断开" - NEED_FIX=true -fi - -# 4. 本地网络信息 -echo "" -echo "🔍 步骤4: 本地网络信息" -echo "----------------------------------------" -echo "本地IP地址:" -ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print " " $2}' - -# 5. Java应用配置检查 -echo "" -echo "🔍 步骤5: Java应用配置检查" -echo "----------------------------------------" -CONFIG_FILE="/Users/ningjinpeng/Desktop/git/private/github/bytedesk-private/starter/src/main/resources/application-local.properties" - -if [[ -f "$CONFIG_FILE" ]]; then - echo "当前配置:" - grep -E "bytedesk\.freeswitch\." "$CONFIG_FILE" | grep -v "^#" | while IFS= read -r line; do - echo " $line" - done -else - echo "⚠️ 配置文件未找到: $CONFIG_FILE" -fi - -# 6. 修复建议 -echo "" -echo "🛠️ 修复建议" -echo "----------------------------------------" - -if [[ "$NEED_FIX" == "true" ]]; then - echo "需要在FreeSwitch服务器上执行修复:" - echo "" - echo "方法1: 一键修复 (推荐)" - echo "1. SSH连接到服务器:" - echo " ssh root@14.103.165.199" - echo "" - echo "2. 执行一键修复命令:" - echo " curl -s https://raw.githubusercontent.com/your-repo/fix.sh | bash" - echo " 或者复制以下代码执行:" - echo "" - cat << 'EOF' -#!/bin/bash -# 复制此代码到服务器执行 -CONFIG_FILE="/usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml" -cp "$CONFIG_FILE" "/tmp/event_socket.backup.$(date +%s)" -cat > "$CONFIG_FILE" << 'INNER_EOF' - - - - - - - - -INNER_EOF -systemctl restart freeswitch -sleep 3 -echo "修复完成,请测试连接" -EOF - echo "" - echo "方法2: 手动修复" - echo "参考详细修复指南: MANUAL_FIX_GUIDE.md" - echo "" - echo "方法3: SSH隧道临时解决" - echo "ssh -L 8021:localhost:8021 root@14.103.165.199" - echo "然后修改Java配置连接到127.0.0.1:8021" - -else - echo "✅ 配置正常,无需修复" - echo "如果Java应用仍无法连接,请检查:" - echo " 1. 应用配置是否正确" - echo " 2. 网络防火墙设置" - echo " 3. Java应用日志" -fi - -# 7. 测试命令 -echo "" -echo "🧪 测试命令" -echo "----------------------------------------" -echo "修复后使用以下命令测试:" -echo "" -echo "1. 网络连接测试:" -echo " telnet 14.103.165.199 8021" -echo "" -echo "2. Java应用健康检查:" -echo " curl http://localhost:9003/actuator/health/freeSwitch" -echo "" -echo "3. ESL连接测试:" -echo " curl -X POST http://localhost:9003/api/v1/freeswitch/test-connection" -echo "" -echo "4. 查看应用日志:" -echo " tail -f /Users/ningjinpeng/Desktop/git/private/github/bytedesk-private/logs/bytedeskim.log" - -echo "" -echo "=======================================" -echo "诊断完成 - $(date)" -echo "=======================================" diff --git a/plugins/freeswitch/diagnose_freeswitch.sh b/plugins/freeswitch/diagnose_freeswitch.sh deleted file mode 100755 index 215be219e6..0000000000 --- a/plugins/freeswitch/diagnose_freeswitch.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# FreeSwitch ESL 连接诊断脚本 -# 创建时间: 2025-06-08 - -echo "=== FreeSwitch ESL 连接诊断 ===" -echo "时间: $(date)" -echo "目标服务器: 14.103.165.199:8021" -echo "" - -echo "1. 测试端口连通性..." -timeout 5 bash -c "/dev/null -echo "" - -echo "4. 检查本地网络配置..." -echo "本地IP地址:" -ifconfig | grep "inet " | grep -v 127.0.0.1 -echo "" - -echo "5. 分析可能的原因:" -echo " - 如果收到 'rude-rejection',说明FreeSwitch服务运行正常但ACL拒绝连接" -echo " - 如果连接超时,说明网络不通或端口未开放" -echo " - 如果连接拒绝,说明FreeSwitch服务未运行" -echo "" - -echo "6. 建议的修复步骤:" -echo " a) 确认FreeSwitch服务状态: systemctl status freeswitch" -echo " b) 重新加载ESL配置: fs_cli -x 'reload mod_event_socket'" -echo " c) 重启FreeSwitch服务: systemctl restart freeswitch" -echo " d) 检查防火墙设置: iptables -L | grep 8021" -echo " e) 查看FreeSwitch日志: tail -f /usr/local/freeswitch/log/freeswitch.log" -echo "" - -echo "=== 诊断完成 ===" diff --git a/plugins/freeswitch/fix_freeswitch_config.sh b/plugins/freeswitch/fix_freeswitch_config.sh deleted file mode 100755 index c3bf440143..0000000000 --- a/plugins/freeswitch/fix_freeswitch_config.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/bash - -# FreeSwitch 配置检查和修复脚本 -# 针对 rude-rejection 问题的完整解决方案 - -SERVER="14.103.165.199" -USERNAME="root" - -echo "=== FreeSwitch ESL 配置修复脚本 ===" -echo "目标服务器: $SERVER" -echo "时间: $(date)" -echo "" - -echo "步骤1: 查找 FreeSwitch 配置文件..." -echo "常见配置文件位置:" -echo " - /etc/freeswitch/autoload_configs/event_socket.conf.xml" -echo " - /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml" -echo " - /opt/freeswitch/conf/autoload_configs/event_socket.conf.xml" -echo "" - -echo "步骤2: 生成修复用的配置文件..." - -# 生成正确的 event_socket.conf.xml -cat > event_socket_fixed.conf.xml << 'EOF' - - - - - - - - - - - - - - -EOF - -echo "✅ 已生成修复配置文件: event_socket_fixed.conf.xml" -echo "" - -# 生成更新的 ACL 配置 -cat > acl_fixed.conf.xml << 'EOF' - - - - - - - - - - - - - - - - - - - - -EOF - -echo "✅ 已生成修复ACL配置文件: acl_fixed.conf.xml" -echo "" - -echo "步骤3: 手动修复指令 (需要在服务器上执行)..." -echo "" -echo "请在服务器 $SERVER 上执行以下命令:" -echo "" -echo "# 1. 备份原配置" -echo "sudo cp /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml.backup.$(date +%Y%m%d)" -echo "" -echo "# 2. 查找实际配置文件位置" -echo "sudo find /etc /usr/local /opt -name 'event_socket.conf.xml' -type f 2>/dev/null" -echo "" -echo "# 3. 临时移除ACL限制的配置内容:" -echo "cat > /tmp/event_socket_temp.xml << 'INNER_EOF'" -echo "" -echo " " -echo " " -echo " " -echo " " -echo " " -echo " " -echo "" -echo "INNER_EOF" -echo "" -echo "# 4. 覆盖配置文件 (请根据实际路径调整)" -echo "sudo cp /tmp/event_socket_temp.xml /usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml" -echo "" -echo "# 5. 重新加载配置" -echo "sudo fs_cli -x 'reload mod_event_socket'" -echo "" -echo "# 6. 如果重新加载失败,重启FreeSwitch" -echo "sudo systemctl restart freeswitch" -echo "# 或者" -echo "sudo /etc/init.d/freeswitch restart" -echo "" -echo "# 7. 验证配置" -echo "sudo fs_cli -x 'show modules' | grep event_socket" -echo "" -echo "# 8. 测试连接" -echo "telnet localhost 8021" -echo "" - -echo "步骤4: 验证修复..." -echo "请在执行上述命令后,运行以下测试:" -echo "" -echo "# 从服务器本地测试" -echo "telnet localhost 8021" -echo "" -echo "# 从客户端测试" -echo "telnet $SERVER 8021" -echo "" - -echo "步骤5: 如果问题仍然存在..." -echo "1. 检查FreeSwitch日志:" -echo " tail -f /usr/local/freeswitch/log/freeswitch.log" -echo "" -echo "2. 检查是否有多个FreeSwitch实例:" -echo " ps aux | grep freeswitch" -echo "" -echo "3. 检查端口监听状态:" -echo " netstat -tlnp | grep 8021" -echo "" -echo "4. 检查防火墙规则:" -echo " iptables -L -n | grep 8021" -echo "" - -echo "=== 脚本完成 ===" -echo "注意: 此配置移除了所有ACL限制,仅用于测试。" -echo "生产环境请重新添加适当的IP限制。" diff --git a/plugins/freeswitch/freeswitch_acl_fix.sh b/plugins/freeswitch/freeswitch_acl_fix.sh deleted file mode 100755 index 46954ae564..0000000000 --- a/plugins/freeswitch/freeswitch_acl_fix.sh +++ /dev/null @@ -1,274 +0,0 @@ -#!/bin/bash - -# FreeSwitch ESL ACL 修复工具 -# 专门用于解决 "rude-rejection" 问题 -# 作者: Bytedesk Team -# 日期: 2025-06-08 - -set -e # 脚本遇到错误时立即退出 - -# 配置变量 -FREESWITCH_CONF_DIR="/usr/local/freeswitch/conf" -EVENT_SOCKET_CONF="$FREESWITCH_CONF_DIR/autoload_configs/event_socket.conf.xml" -ACL_CONF="$FREESWITCH_CONF_DIR/autoload_configs/acl.conf.xml" -BACKUP_DIR="/tmp/freeswitch_backup_$(date +%Y%m%d_%H%M%S)" - -# 颜色定义 -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -BLUE='\033[0;34m' -NC='\033[0m' # No Color - -# 打印带颜色的消息 -print_info() { - echo -e "${BLUE}[INFO]${NC} $1" -} - -print_success() { - echo -e "${GREEN}[SUCCESS]${NC} $1" -} - -print_warning() { - echo -e "${YELLOW}[WARNING]${NC} $1" -} - -print_error() { - echo -e "${RED}[ERROR]${NC} $1" -} - -# 检查是否为root用户 -check_root() { - if [[ $EUID -ne 0 ]]; then - print_error "此脚本需要root权限运行" - echo "请使用: sudo $0" - exit 1 - fi -} - -# 检查FreeSwitch是否安装 -check_freeswitch() { - print_info "检查FreeSwitch安装状态..." - - if ! command -v fs_cli &> /dev/null; then - print_warning "fs_cli命令未找到,尝试查找FreeSwitch安装位置..." - fi - - # 查找可能的配置文件位置 - POSSIBLE_PATHS=( - "/usr/local/freeswitch/conf" - "/etc/freeswitch" - "/opt/freeswitch/conf" - "/usr/share/freeswitch/conf" - ) - - for path in "${POSSIBLE_PATHS[@]}"; do - if [[ -d "$path/autoload_configs" ]]; then - FREESWITCH_CONF_DIR="$path" - EVENT_SOCKET_CONF="$path/autoload_configs/event_socket.conf.xml" - ACL_CONF="$path/autoload_configs/acl.conf.xml" - print_success "找到FreeSwitch配置目录: $path" - break - fi - done - - if [[ ! -d "$FREESWITCH_CONF_DIR" ]]; then - print_error "未找到FreeSwitch配置目录" - exit 1 - fi -} - -# 备份现有配置 -backup_config() { - print_info "备份现有配置到: $BACKUP_DIR" - mkdir -p "$BACKUP_DIR" - - if [[ -f "$EVENT_SOCKET_CONF" ]]; then - cp "$EVENT_SOCKET_CONF" "$BACKUP_DIR/" - print_success "已备份event_socket.conf.xml" - fi - - if [[ -f "$ACL_CONF" ]]; then - cp "$ACL_CONF" "$BACKUP_DIR/" - print_success "已备份acl.conf.xml" - fi -} - -# 修复event_socket.conf.xml -fix_event_socket_config() { - print_info "修复event_socket.conf.xml配置..." - - cat > "$EVENT_SOCKET_CONF" << 'EOF' - - - - - - - - - - - - - - - -EOF - - print_success "event_socket.conf.xml配置已修复" -} - -# 修复acl.conf.xml (添加宽松的ACL配置) -fix_acl_config() { - print_info "修复acl.conf.xml配置..." - - cat > "$ACL_CONF" << 'EOF' - - - - - - - - - - - - - - - - - - - - - - -EOF - - print_success "acl.conf.xml配置已修复" -} - -# 重新加载FreeSwitch配置 -reload_freeswitch() { - print_info "重新加载FreeSwitch配置..." - - # 尝试重新加载event_socket模块 - if command -v fs_cli &> /dev/null; then - print_info "使用fs_cli重新加载event_socket模块..." - if fs_cli -x "reload mod_event_socket"; then - print_success "event_socket模块重新加载成功" - return 0 - else - print_warning "模块重新加载失败,将尝试重启FreeSwitch服务" - fi - fi - - # 尝试重启FreeSwitch服务 - print_info "重启FreeSwitch服务..." - if systemctl restart freeswitch; then - print_success "FreeSwitch服务重启成功" - sleep 3 # 等待服务完全启动 - elif service freeswitch restart; then - print_success "FreeSwitch服务重启成功" - sleep 3 - else - print_error "无法重启FreeSwitch服务" - return 1 - fi -} - -# 测试修复结果 -test_fix() { - print_info "测试修复结果..." - - # 等待服务启动 - sleep 2 - - # 测试本地连接 - print_info "测试本地ESL连接..." - if timeout 5 bash -c "echo '' | telnet localhost 8021" 2>/dev/null | grep -q "Content-Type"; then - response=$(timeout 3 bash -c "echo '' | telnet localhost 8021" 2>/dev/null) - if echo "$response" | grep -q "rude-rejection"; then - print_error "修复失败:仍然收到rude-rejection错误" - return 1 - else - print_success "本地ESL连接测试成功" - fi - else - print_error "无法连接到本地ESL端口" - return 1 - fi - - # 检查端口监听状态 - if netstat -tlnp | grep ":8021 " | grep -q LISTEN; then - print_success "端口8021正在监听" - else - print_warning "端口8021未在监听状态" - fi - - # 显示FreeSwitch进程状态 - if pgrep freeswitch > /dev/null; then - print_success "FreeSwitch进程运行中" - else - print_error "FreeSwitch进程未运行" - return 1 - fi -} - -# 显示修复后的连接测试命令 -show_test_commands() { - print_info "修复完成!请使用以下命令测试连接:" - echo "" - echo "1. 本地测试:" - echo " telnet localhost 8021" - echo "" - echo "2. 远程测试 (从客户端):" - echo " telnet $(hostname -I | awk '{print $1}') 8021" - echo "" - echo "3. 使用fs_cli测试:" - echo " fs_cli -H localhost -P 8021 -p bytedesk123" - echo "" - echo "4. 查看FreeSwitch日志:" - echo " tail -f /usr/local/freeswitch/log/freeswitch.log" - echo "" - - if [[ -n "$BACKUP_DIR" ]]; then - print_info "配置备份位置: $BACKUP_DIR" - echo "如需恢复原配置,请运行:" - echo " cp $BACKUP_DIR/*.xml $FREESWITCH_CONF_DIR/autoload_configs/" - fi -} - -# 主函数 -main() { - echo "=======================================" - echo " FreeSwitch ESL ACL 修复工具" - echo " 解决 rude-rejection 连接问题" - echo "=======================================" - echo "" - - check_root - check_freeswitch - backup_config - fix_event_socket_config - fix_acl_config - - if reload_freeswitch; then - if test_fix; then - print_success "修复成功完成!" - show_test_commands - else - print_error "修复验证失败,请检查日志" - exit 1 - fi - else - print_error "FreeSwitch重启失败" - exit 1 - fi -} - -# 脚本入口 -main "$@" diff --git a/plugins/freeswitch/monitor_esl_status.sh b/plugins/freeswitch/monitor_esl_status.sh deleted file mode 100755 index 360d1c1af7..0000000000 --- a/plugins/freeswitch/monitor_esl_status.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash - -# FreeSwitch ESL 连接状态监控 (本地执行) -# 持续监控连接状态变化 - -SERVER="14.103.165.199" -PORT="8021" - -echo "=========================================" -echo "FreeSwitch ESL 连接状态监控" -echo "=========================================" -echo "监控服务器: $SERVER:$PORT" -echo "开始时间: $(date)" -echo "按 Ctrl+C 停止监控" -echo "" - -# 初始状态检查 -echo "🔍 初始状态检查:" -echo "-----------------------------------------" - -# 1. 网络连通性 -if ping -c 1 -W 2 $SERVER > /dev/null 2>&1; then - echo "✅ 网络连通性: 正常" -else - echo "❌ 网络连通性: 失败" - exit 1 -fi - -# 2. 端口连通性 -if nc -z -w 2 $SERVER $PORT 2>/dev/null; then - echo "✅ 端口连通性: 正常" -else - echo "❌ 端口连通性: 失败" - exit 1 -fi - -# 3. ESL协议测试 -echo "🔍 ESL协议测试:" -RESPONSE=$(timeout 2 bash -c "echo '' | nc $SERVER $PORT" 2>/dev/null) - -if [[ -n "$RESPONSE" ]]; then - if echo "$RESPONSE" | grep -q "rude-rejection"; then - echo "❌ ESL状态: 连接被拒绝 (ACL限制)" - echo " 响应: $(echo "$RESPONSE" | head -1)" - elif echo "$RESPONSE" | grep -q "auth/request"; then - echo "✅ ESL状态: 等待认证 (连接正常)" - echo " 响应: $(echo "$RESPONSE" | head -1)" - else - echo "⚠️ ESL状态: 未知响应" - echo " 响应: $(echo "$RESPONSE" | head -1)" - fi -else - echo "❌ ESL状态: 无响应" -fi - -echo "" -echo "=== 持续监控模式 (每30秒检查一次) ===" -echo "" - -# 持续监控循环 -while true; do - TIMESTAMP=$(date '+%H:%M:%S') - - # 测试ESL连接 - RESPONSE=$(timeout 2 bash -c "echo '' | nc $SERVER $PORT" 2>/dev/null) - - if [[ -n "$RESPONSE" ]]; then - if echo "$RESPONSE" | grep -q "rude-rejection"; then - echo "[$TIMESTAMP] ❌ 仍然被拒绝 - ACL限制未解除" - elif echo "$RESPONSE" | grep -q "auth/request"; then - echo "[$TIMESTAMP] ✅ 连接成功! - 收到认证请求" - echo "" - echo "🎉 FreeSwitch ESL 修复成功!" - echo "Java应用现在可以连接到FreeSwitch了" - break - else - echo "[$TIMESTAMP] ⚠️ 未知响应: $(echo "$RESPONSE" | head -1 | tr -d '\r\n')" - fi - else - echo "[$TIMESTAMP] ❌ 无响应或连接失败" - fi - - sleep 30 -done - -echo "" -echo "=== 最终验证 ===" - -# Java应用健康检查测试 -if command -v curl > /dev/null 2>&1; then - echo "🔍 测试Java应用健康状态..." - - # 假设Java应用在本地9003端口运行 - if curl -s -f http://localhost:9003/actuator/health/freeSwitch > /dev/null 2>&1; then - echo "✅ Java应用FreeSwitch健康检查通过" - - # 获取详细健康状态 - echo "" - echo "📊 详细健康状态:" - curl -s http://localhost:9003/actuator/health/freeSwitch | python -m json.tool 2>/dev/null || echo "健康检查响应获取成功" - - else - echo "⚠️ Java应用未运行或健康检查失败" - echo " 请启动Java应用并确保FreeSwitch模块已启用" - fi -else - echo "💡 建议: 安装curl后可测试Java应用健康状态" -fi - -echo "" -echo "=== 监控完成 ===" -echo "结束时间: $(date)" diff --git a/plugins/freeswitch/mvnw b/plugins/freeswitch/mvnw deleted file mode 100755 index 66df285428..0000000000 --- a/plugins/freeswitch/mvnw +++ /dev/null @@ -1,308 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.2.0 -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /usr/local/etc/mavenrc ] ; then - . /usr/local/etc/mavenrc - fi - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "$(uname)" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME - else - JAVA_HOME="/Library/Java/Home"; export JAVA_HOME - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=$(java-config --jre-home) - fi -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --unix "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --unix "$CLASSPATH") -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && - JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="$(which javac)" - if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=$(which readlink) - if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then - if $darwin ; then - javaHome="$(dirname "\"$javaExecutable\"")" - javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" - else - javaExecutable="$(readlink -f "\"$javaExecutable\"")" - fi - javaHome="$(dirname "\"$javaExecutable\"")" - javaHome=$(expr "$javaHome" : '\(.*\)/bin') - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=$(cd "$wdir/.." || exit 1; pwd) - fi - # end of workaround - done - printf '%s' "$(cd "$basedir" || exit 1; pwd)" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - # Remove \r in case we run on Windows within Git Bash - # and check out the repository with auto CRLF management - # enabled. Otherwise, we may read lines that are delimited with - # \r\n and produce $'-Xarg\r' rather than -Xarg due to word - # splitting rules. - tr -s '\r\n' ' ' < "$1" - fi -} - -log() { - if [ "$MVNW_VERBOSE" = true ]; then - printf '%s\n' "$1" - fi -} - -BASE_DIR=$(find_maven_basedir "$(dirname "$0")") -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -log "$MAVEN_PROJECTBASEDIR" - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" -if [ -r "$wrapperJarPath" ]; then - log "Found $wrapperJarPath" -else - log "Couldn't find $wrapperJarPath, downloading it ..." - - if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - fi - while IFS="=" read -r key value; do - # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) - safeValue=$(echo "$value" | tr -d '\r') - case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; - esac - done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" - log "Downloading from: $wrapperUrl" - - if $cygwin; then - wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") - fi - - if command -v wget > /dev/null; then - log "Found wget ... using wget" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - log "Found curl ... using curl" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - fi - else - log "Falling back to using Java to download" - javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaSource=$(cygpath --path --windows "$javaSource") - javaClass=$(cygpath --path --windows "$javaClass") - fi - if [ -e "$javaSource" ]; then - if [ ! -e "$javaClass" ]; then - log " - Compiling MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/javac" "$javaSource") - fi - if [ -e "$javaClass" ]; then - log " - Running MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -# If specified, validate the SHA-256 sum of the Maven wrapper jar file -wrapperSha256Sum="" -while IFS="=" read -r key value; do - case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; - esac -done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" -if [ -n "$wrapperSha256Sum" ]; then - wrapperSha256Result=false - if command -v sha256sum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - elif command -v shasum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." - echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." - exit 1 - fi - if [ $wrapperSha256Result = false ]; then - echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 - echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 - echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 - exit 1 - fi -fi - -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --windows "$CLASSPATH") - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -# shellcheck disable=SC2086 # safe args -exec "$JAVACMD" \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/plugins/freeswitch/mvnw.cmd b/plugins/freeswitch/mvnw.cmd deleted file mode 100644 index 95ba6f54ac..0000000000 --- a/plugins/freeswitch/mvnw.cmd +++ /dev/null @@ -1,205 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.2.0 -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* -if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %WRAPPER_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file -SET WRAPPER_SHA_256_SUM="" -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B -) -IF NOT %WRAPPER_SHA_256_SUM%=="" ( - powershell -Command "&{"^ - "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ - "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ - " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ - " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ - " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ - " exit 1;"^ - "}"^ - "}" - if ERRORLEVEL 1 goto error -) - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% ^ - %JVM_CONFIG_MAVEN_PROPS% ^ - %MAVEN_OPTS% ^ - %MAVEN_DEBUG_OPTS% ^ - -classpath %WRAPPER_JAR% ^ - "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ - %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" -if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%"=="on" pause - -if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% - -cmd /C exit /B %ERROR_CODE% diff --git a/plugins/freeswitch/one_click_fix.sh b/plugins/freeswitch/one_click_fix.sh deleted file mode 100644 index 98edc40cf0..0000000000 --- a/plugins/freeswitch/one_click_fix.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -# FreeSwitch ESL 一键修复脚本 - 请在FreeSwitch服务器上执行 - -echo "=== FreeSwitch ESL 一键修复脚本 ===" -echo "开始时间: $(date)" - -# 1. 查找配置文件位置 -echo "步骤1: 查找配置文件..." -CONFIG_PATHS=$(find /etc /usr/local /opt /var -name "event_socket.conf.xml" -type f 2>/dev/null) -echo "找到的配置文件位置:" -echo "$CONFIG_PATHS" - -# 2. 尝试常见路径 -COMMON_PATHS=( - "/usr/local/freeswitch/conf/autoload_configs/event_socket.conf.xml" - "/etc/freeswitch/autoload_configs/event_socket.conf.xml" - "/opt/freeswitch/conf/autoload_configs/event_socket.conf.xml" -) - -CONFIG_FILE="" -for path in "${COMMON_PATHS[@]}"; do - if [[ -f "$path" ]]; then - CONFIG_FILE="$path" - echo "使用配置文件: $CONFIG_FILE" - break - fi -done - -if [[ -z "$CONFIG_FILE" && -n "$CONFIG_PATHS" ]]; then - CONFIG_FILE=$(echo "$CONFIG_PATHS" | head -1) - echo "使用第一个找到的配置文件: $CONFIG_FILE" -fi - -if [[ -z "$CONFIG_FILE" ]]; then - echo "❌ 错误: 未找到event_socket.conf.xml配置文件" - echo "请手动指定配置文件路径" - exit 1 -fi - -# 3. 备份原配置 -echo "步骤2: 备份原配置..." -BACKUP_FILE="/tmp/event_socket.conf.xml.backup.$(date +%Y%m%d_%H%M%S)" -cp "$CONFIG_FILE" "$BACKUP_FILE" -echo "✅ 已备份到: $BACKUP_FILE" - -# 4. 创建新配置 -echo "步骤3: 创建新配置..." -cat > "$CONFIG_FILE" << 'EOF' - - - - - - - - - - - - - -EOF -echo "✅ 新配置已创建" - -# 5. 重启FreeSwitch -echo "步骤4: 重启FreeSwitch服务..." -if command -v systemctl &> /dev/null; then - systemctl restart freeswitch && echo "✅ systemctl重启成功" || echo "❌ systemctl重启失败" -elif command -v service &> /dev/null; then - service freeswitch restart && echo "✅ service重启成功" || echo "❌ service重启失败" -else - echo "⚠️ 无法自动重启,请手动重启FreeSwitch" -fi - -# 6. 等待服务启动 -echo "步骤5: 等待服务启动..." -sleep 5 - -# 7. 验证修复 -echo "步骤6: 验证修复..." - -# 检查端口监听 -if netstat -tlnp 2>/dev/null | grep -q ":8021.*LISTEN" || ss -tlnp 2>/dev/null | grep -q ":8021.*LISTEN"; then - echo "✅ 端口8021正在监听" -else - echo "❌ 端口8021未在监听" -fi - -# 检查进程 -if pgrep freeswitch > /dev/null; then - echo "✅ FreeSwitch进程运行中" -else - echo "❌ FreeSwitch进程未运行" -fi - -# 测试连接 -echo "步骤7: 测试ESL连接..." -RESPONSE=$(timeout 3 bash -c "echo '' | nc localhost 8021" 2>/dev/null || echo "连接失败") - -if echo "$RESPONSE" | grep -q "auth/request"; then - echo "✅ ESL连接测试成功 - 收到认证请求" -elif echo "$RESPONSE" | grep -q "rude-rejection"; then - echo "❌ 仍然收到rude-rejection错误" - echo "建议: 检查是否有其他配置文件或重启系统" -else - echo "⚠️ 连接响应: $RESPONSE" -fi - -echo "" -echo "=== 修复完成 ===" -echo "请从客户端测试连接: telnet $(hostname -I | awk '{print $1}') 8021" -echo "配置备份位置: $BACKUP_FILE" -echo "如需恢复: cp $BACKUP_FILE $CONFIG_FILE && systemctl restart freeswitch" diff --git a/plugins/freeswitch/pom.xml b/plugins/freeswitch/pom.xml deleted file mode 100644 index ece1ae4331..0000000000 --- a/plugins/freeswitch/pom.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - 4.0.0 - - - com.bytedesk - plugins - ${revision} - - - bytedesk-plugin-freeswitch - ${revision} - - bytedesk-plugin-freeswitch - https://ai.bytedesk.com - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/freeswitch/readme.md b/plugins/freeswitch/readme.md deleted file mode 100644 index 2c6a4b7fae..0000000000 --- a/plugins/freeswitch/readme.md +++ /dev/null @@ -1,418 +0,0 @@ - -# FreeSwitch Integration Module for Bytedesk - -基于 Spring Boot 的 FreeSwitch 集成模块,支持语音通话、WebRTC、呼叫中心功能和事件监听。 - -## ⚠️ ESL连接问题修复 (2025-06-08) - -如果遇到 `text/rude-rejection` 或 `Access Denied` 错误,请查看详细修复指南: - -📋 **[FreeSwitch ESL 连接问题修复指南](FREESWITCH_ESL_FIX_GUIDE.md)** - -### 快速修复 - -1. **检查连接状态** - 访问健康检查端点: - - ```bash - curl http://localhost:9003/actuator/health/freeSwitch - ``` - -2. **测试连接** - 使用管理API: - - ```bash - curl -X POST http://localhost:9003/api/v1/freeswitch/test-connection - ``` - -3. **查看配置** - 获取当前配置: - - ```bash - curl http://localhost:9003/api/v1/freeswitch/config - ``` - -### 新增功能 - -- ✅ **智能错误诊断**: 自动识别连接问题并提供解决建议 -- ✅ **连接重试机制**: 指数退避重试策略 -- ✅ **健康状态监控**: Spring Boot Actuator集成 -- ✅ **管理REST API**: 连接测试和状态查询接口 -- ✅ **启动时连接测试**: 应用启动时自动检测FreeSwitch连接 - -## 功能特性 - -- ✅ **FreeSwitch ESL 集成**: 通过 Event Socket Library 连接和控制 FreeSwitch -- ✅ **呼叫控制**: 呼叫发起、挂断、转接、保持等基本功能 -- ✅ **WebRTC 支持**: 基于 Verto 协议的 WebRTC 音视频通话 -- ✅ **实时事件监听**: 监听 FreeSwitch 事件并转发到 Spring Boot 应用 -- ✅ **呼叫中心功能**: 队列管理、坐席管理、通话录音 -- ✅ **REST API**: 完整的 HTTP 接口用于呼叫控制和状态查询 -- ✅ **WebSocket 信令**: 支持 WebRTC 信令交换和实时消息推送 - -## 项目结构 - -```bash -plugins/freeswitch/ -├── pom.xml # Maven 配置文件 -├── readme.md # 项目文档 -└── src/main/java/com/bytedesk/freeswitch/ - ├── freeswitch/ - │ ├── FreeSwitchService.java # FreeSwitch 核心服务 - │ ├── FreeSwitchController.java # REST API 控制器 - │ └── WebSocketConfig.java # WebSocket 配置 - ├── webrtc/ - │ └── WebRTCSignalingController.java # WebRTC 信令控制器 - ├── callcenter/ - │ └── CallService.java # 呼叫服务 - └── resources/ - └── static/ - └── webrtc-demo.html # WebRTC 测试页面 -``` - -## 环境要求 - -- Java 17+ -- Spring Boot 3.x -- FreeSwitch 1.10+ -- Maven 3.6+ - -## 快速开始 - -### 1. 安装 FreeSwitch - -```bash -# macOS -brew install freeswitch - -# Ubuntu/Debian -apt-get update -apt-get install freeswitch - -# CentOS/RHEL -yum install freeswitch -``` - -### 2. 配置 FreeSwitch - -将项目提供的配置文件复制到 FreeSwitch 配置目录: - -```bash -# 复制配置文件 -cp deploy/private/freeswitch/conf/vars_bytedesk.xml /usr/local/freeswitch/conf/ -cp deploy/private/freeswitch/conf/directory/bytedesk.xml /usr/local/freeswitch/conf/directory/ -cp deploy/private/freeswitch/conf/autoload_configs/event_socket.conf.xml /usr/local/freeswitch/conf/autoload_configs/ -cp deploy/private/freeswitch/conf/autoload_configs/verto_bytedesk.conf.xml /usr/local/freeswitch/conf/autoload_configs/ -``` - -### 3. 启动 FreeSwitch - -```bash -# 启动 FreeSwitch -freeswitch -nonat - -# 或者作为后台服务启动 -freeswitch -nc -nonat -``` - -### 4. 配置 Spring Boot - -在 `application-local.properties` 中配置 FreeSwitch 连接参数: - -```properties -# FreeSwitch ESL 配置 -freeswitch.esl.host=127.0.0.1 -freeswitch.esl.port=8021 -freeswitch.esl.password=bytedesk123 -freeswitch.esl.timeout=10000 - -# WebRTC 配置 -freeswitch.webrtc.ws.url=ws://127.0.0.1:15066 -freeswitch.webrtc.wss.url=wss://127.0.0.1:17443 - -# 呼叫中心配置 -freeswitch.callcenter.queue.default=bytedesk_queue -freeswitch.callcenter.recording.enabled=true -``` - -### 5. 启动应用 - -```bash -cd plugins/freeswitch -mvn spring-boot:run -``` - -## API 使用示例 - -### 呼叫控制 API - -#### 发起呼叫 - -```bash -curl -X POST http://localhost:9003/api/freeswitch/originate \ - -H "Content-Type: application/json" \ - -d '{ - "from": "1000", - "to": "1001", - "timeout": 60 - }' -``` - -#### 挂断呼叫 - -```bash -curl -X POST http://localhost:9003/api/freeswitch/hangup \ - -H "Content-Type: application/json" \ - -d '{ - "uuid": "call-uuid-here" - }' -``` - -#### 转接呼叫 - -```bash -curl -X POST http://localhost:9003/api/freeswitch/transfer \ - -H "Content-Type: application/json" \ - -d '{ - "uuid": "call-uuid-here", - "destination": "1002" - }' -``` - -#### 播放文件 - -```bash -curl -X POST http://localhost:9003/api/freeswitch/playback \ - -H "Content-Type: application/json" \ - -d '{ - "uuid": "call-uuid-here", - "file": "/usr/local/freeswitch/sounds/en/us/callie/ivr/8000/ivr-welcome.wav" - }' -``` - -### 呼叫状态查询 - -#### 获取活跃通话 - -```bash -curl http://localhost:9003/api/freeswitch/calls/active -``` - -#### 获取通道状态 - -```bash -curl http://localhost:9003/api/freeswitch/channels/status -``` - -## WebRTC 集成 - -### 1. 访问测试页面 - -启动应用后,访问: - -### 2. WebSocket 连接 - -```javascript -// 连接到 WebSocket -const socket = new SockJS('/ws'); -const stompClient = Stomp.over(socket); - -stompClient.connect({}, function (frame) { - console.log('Connected: ' + frame); - - // 订阅信令消息 - stompClient.subscribe('/topic/webrtc/signaling', function (message) { - const data = JSON.parse(message.body); - handleSignalingMessage(data); - }); -}); - -// 发送 WebRTC Offer -function sendOffer(offer) { - stompClient.send("/app/webrtc/offer", {}, JSON.stringify({ - type: 'offer', - sdp: offer.sdp, - from: 'user1', - to: 'user2' - })); -} -``` - -### 3. 呼叫流程 - -1. **发起呼叫**: 通过 WebSocket 发送 offer -2. **应答呼叫**: 接收方发送 answer -3. **ICE 候选交换**: 交换网络连接信息 -4. **建立连接**: WebRTC 点对点连接建立 -5. **通话控制**: 静音、挂断等操作 - -## 事件监听 - -应用会自动监听 FreeSwitch 事件并通过 WebSocket 推送: - -```javascript -// 订阅呼叫事件 -stompClient.subscribe('/topic/call/events', function (message) { - const event = JSON.parse(message.body); - console.log('Call event:', event); - - switch(event.type) { - case 'CHANNEL_CREATE': - console.log('New call created:', event.uuid); - break; - case 'CHANNEL_ANSWER': - console.log('Call answered:', event.uuid); - break; - case 'CHANNEL_HANGUP': - console.log('Call ended:', event.uuid); - break; - } -}); -``` - -## 呼叫中心功能 - -### 队列管理 - -```bash -# 创建队列 -curl -X POST http://localhost:9003/api/callcenter/queue \ - -H "Content-Type: application/json" \ - -d '{ - "name": "support_queue", - "strategy": "longest-idle-agent", - "timeout": 300 - }' - -# 加入队列 -curl -X POST http://localhost:9003/api/callcenter/queue/support_queue/join \ - -H "Content-Type: application/json" \ - -d '{ - "caller": "1000" - }' -``` - -### 坐席管理 - -```bash -# 坐席登录 -curl -X POST http://localhost:9003/api/callcenter/agent/login \ - -H "Content-Type: application/json" \ - -d '{ - "agentId": "agent001", - "queue": "support_queue", - "extension": "1001" - }' - -# 坐席状态设置 -curl -X POST http://localhost:9003/api/callcenter/agent/agent001/status \ - -H "Content-Type: application/json" \ - -d '{ - "status": "Available" - }' -``` - -## 配置说明 - -### FreeSwitch 配置文件 - -- **vars_bytedesk.xml**: 全局变量配置 -- **bytedesk.xml**: 用户目录配置 -- **event_socket.conf.xml**: ESL 服务配置 -- **verto_bytedesk.conf.xml**: WebRTC Verto 配置 - -### 关键配置参数 - -```xml - - - - - - - - - - -``` - -## 故障排除 - -### 常见问题 - -1. **无法连接 FreeSwitch ESL** - - 检查 FreeSwitch 是否启动 - - 验证 ESL 密码和端口配置 - - 确认防火墙设置 - -2. **WebRTC 连接失败** - - 检查 Verto 配置是否正确 - - 验证 WebSocket 端口是否开放 - - 确认 STUN/TURN 服务器配置 - -3. **音频质量问题** - - 检查编解码器配置 - - 验证网络带宽和延迟 - - 调整 RTP 端口范围 - -### 日志查看 - -```bash -# FreeSwitch 日志 -tail -f /usr/local/freeswitch/log/freeswitch.log - -# Spring Boot 日志 -tail -f logs/bytedeskim.log -``` - -## 开发指南 - -### 添加新的呼叫功能 - -1. 在 `FreeSwitchService` 中添加新方法 -2. 在 `FreeSwitchController` 中暴露 REST API -3. 更新事件监听逻辑(如需要) -4. 添加相应的测试用例 - -### 自定义事件处理 - -```java -@Component -public class CustomEventHandler { - - @EventListener - public void handleChannelCreate(ChannelCreateEvent event) { - // 处理通道创建事件 - log.info("Channel created: {}", event.getUuid()); - } - - @EventListener - public void handleChannelAnswer(ChannelAnswerEvent event) { - // 处理通话接听事件 - log.info("Channel answered: {}", event.getUuid()); - } -} -``` - -## 许可证 - -本项目采用 Business Source License 1.1 许可证。详情请参阅 [LICENSE](../../LICENSE) 文件。 - -## 支持 - -- 邮箱: <270580156@qq.com> -- 官网: -- GitHub: - -## 贡献 - -欢迎提交 Issue 和 Pull Request。详情请参阅 [CONTRIBUTING.md](../../CONTRIBUTING.md)。 diff --git a/plugins/freeswitch/readme.zh.md b/plugins/freeswitch/readme.zh.md deleted file mode 100644 index 272f250c8f..0000000000 --- a/plugins/freeswitch/readme.zh.md +++ /dev/null @@ -1,153 +0,0 @@ -# 微语智能呼叫中心系统 - -## AI驱动的企业级通信解决方案 - -微语智能呼叫中心是一套革命性的AI驱动企业通信平台,致力于重新定义客户服务体验。通过整合最先进的大语言模型技术,我们提供全方位、智能化的客户服务解决方案,帮助企业显著提升服务质量,降低运营成本。 - - - -## AI 驱动的智能服务核心优势 - -微语智能呼叫中心将大语言模型深度融入客户服务流程,带来前所未有的智能化体验: - -### 🤖 智能语音助手 - -基于大语言模型的智能语音助手,为企业带来革命性的服务能力提升: - -- **自然语言理解**:系统能理解复杂的自然语言表达,不再局限于简单的关键词匹配 -- **多轮对话能力**:支持像人类一样的连贯对话,记住上下文,提供流畅的交互体验 -- **7×24小时不间断服务**:全天候自动处理客户咨询,不受时间和人力限制 -- **自动处理常见咨询**:能够自动处理80%的常见咨询,极大减轻人工座席负担 - -### 📊 智能数据分析 - -AI驱动的数据分析系统,将海量的服务数据转化为有价值的业务洞察: - -- **实时情感分析**:自动识别客户情绪变化,及时调整服务策略 -- **智能质检评分**:全自动化的通话质检系统,提供客观公正的服务评估 -- **预测性分析**:提前预测潜在问题和商机,主动干预优化 - -### 🎯 智能路由分配 - -基于AI的智能路由系统,大幅提升服务效率和客户满意度: - -- **智能技能匹配**:根据问题类型和座席专长自动分配,确保问题由最合适的人处理 -- **负载均衡**:智能平衡座席工作量,避免出现部分座席过载而其他闲置的情况 -- **实时优化**:系统不断学习和优化分配策略,持续提升匹配精准度 - -## 企业级呼叫中心全功能支持 - -微语智能呼叫中心提供全面的企业级功能支持,满足各行业客户多样化需求: - -### 全渠道通信 - -支持多种通信协议和渠道,实现无缝客户沟通: - -- **语音通话**:高清晰度的语音通话,支持固话、手机和网络语音 -- **视频通话**:面对面沟通体验,增强服务亲和力和专业感 -- **即时消息**:多平台即时消息集成,实现全渠道统一管理 - -### 智能质检 - -AI驱动的智能质检系统,全面革新服务质量管理: - -- **自动语音转写**:将通话内容自动转为文本,便于分析和存档 -- **关键词识别**:自动识别重点内容、敏感词和服务亮点 -- **服务质量评分**:客观量化的服务评分系统,帮助持续改进 - -### 智能IVR - -基于AI的新一代智能语音导航系统: - -- **语音识别**:准确识别客户语音指令,无需按键操作 -- **意图理解**:智能理解客户真实需求,不再局限于预设菜单 -- **动态菜单**:根据客户历史和当前情况,提供个性化的服务选项 - -### 智能报表 - -数据驱动决策的强大分析平台: - -- **实时监控**:实时展示关键业务指标,及时发现和处理异常 -- **预测分析**:基于历史数据预测未来趋势,帮助提前规划 -- **自定义报表**:灵活定制各类业务报表,满足不同管理需求 - -## 为什么选择微语智能呼叫中心? - -### 💰 显著降低成本 - -- AI自动化处理80%常见咨询,可减少50%以上的人力成本 -- 智能质检减少90%的人工质检工作量 -- 统一平台减少40%的系统维护和集成成本 - -### ⚡ 大幅提升效率 - -- 智能路由和AI助手提升服务效率达300% -- 减少40%的平均处理时间 -- 首次解决率提升35%,大幅减少重复咨询 - -### 📈 有效增加收入 - -- 智能营销和交叉销售建议提升转化率30% -- 提高客户留存率25%,增加复购机会 -- 数据洞察发掘新的业务增长点 - -### 😊 全面提升满意度 - -- 个性化服务体验提升客户满意度至95% -- 减少60%的等待时间,显著改善客户体验 -- 多渠道一致性服务增强品牌形象 - -## 技术优势 - -微语智能呼叫中心基于企业级技术架构,确保系统安全稳定: - -### 🔒 安全可靠 - -- 企业级安全架构,数据全程加密 -- 多重备份机制,确保数据安全 -- 符合国家和行业安全标准 - -### 📱 灵活部署 - -- 支持公有云、私有云、混合云多种部署方式 -- 模块化设计,可按需配置和扩展 -- 支持与现有系统无缝集成 - -### 🔄 高可用性 - -- 分布式架构设计,支持水平扩展 -- 自动负载均衡和故障转移 -- 确保系统7×24小时稳定运行 - -## 成功案例 - -### 某大型电商平台 - -通过部署微语智能呼叫中心,该电商平台实现了: - -- 客服效率提升300%,同等规模团队处理量增长3倍 -- 客户满意度提升40%,达到行业领先水平 -- 智能推荐带来的额外销售增长22% - -### 某金融机构 - -AI驱动的智能服务系统为这家金融机构带来显著成效: - -- 客户服务成本降低50%,每年节省数千万运营费用 -- 业务转化率提升35%,直接带动收入增长 -- 合规风险降低80%,有效防范违规问题 - -### 某教育机构 - -智能呼叫中心为该教育机构的招生和服务流程带来革命性变化: - -- 招生咨询效率提升200%,无需增加人力即应对业务增长 -- 客户转化率提升45%,显著提高招生效果 -- 学生满意度提升50%,增强品牌口碑 - -## 开启智能客服新时代 - -立即体验微语智能呼叫中心,让AI为您的企业创造实质性价值: - -- [免费试用](https://www.bytedesk.com/contact) -- [预约产品演示](https://www.bytedesk.com/contact) diff --git a/plugins/freeswitch/src/main/java/com/bytedesk/freeswitch/FreeSwitchApplication.java b/plugins/freeswitch/src/main/java/com/bytedesk/freeswitch/FreeSwitchApplication.java deleted file mode 100644 index 1fc015041a..0000000000 --- a/plugins/freeswitch/src/main/java/com/bytedesk/freeswitch/FreeSwitchApplication.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2025-06-23 19:11:59 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.freeswitch; - -// import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class FreeSwitchApplication { - - // public static void main(String[] args) { - // SpringApplication.run(FreeSwitchApplication.class, args); - // } - -} diff --git a/plugins/freeswitch/src/main/resources/application.properties b/plugins/freeswitch/src/main/resources/application.properties deleted file mode 100644 index 515e123aa4..0000000000 --- a/plugins/freeswitch/src/main/resources/application.properties +++ /dev/null @@ -1,13 +0,0 @@ -spring.application.name=freeswitch - -# FreeSwitch配置 -bytedesk.freeswitch.enabled=false -bytedesk.freeswitch.server=127.0.0.1 -bytedesk.freeswitch.eslPort=8021 -bytedesk.freeswitch.eslPassword=bytedesk123 -bytedesk.freeswitch.sipPort=15060 -bytedesk.freeswitch.webrtcPort=17443 -bytedesk.freeswitch.wsPort=15066 -bytedesk.freeswitch.callTimeout=60 -bytedesk.freeswitch.rtpPortStart=16000 -bytedesk.freeswitch.rtpPortEnd=16129 diff --git a/plugins/freeswitch/src/test/java/com/bytedesk/freeswitch/FreeswitchApplicationTests.java b/plugins/freeswitch/src/test/java/com/bytedesk/freeswitch/FreeswitchApplicationTests.java deleted file mode 100644 index 897782a48f..0000000000 --- a/plugins/freeswitch/src/test/java/com/bytedesk/freeswitch/FreeswitchApplicationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2025-05-23 21:41:10 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.freeswitch; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class FreeswitchApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/plugins/freeswitch/src/test/resources/application-test.properties b/plugins/freeswitch/src/test/resources/application-test.properties deleted file mode 100644 index 8dabb5f56c..0000000000 --- a/plugins/freeswitch/src/test/resources/application-test.properties +++ /dev/null @@ -1,34 +0,0 @@ -# Test configuration for FreeSwitch module -# Profile-specific configuration - no need for spring.profiles.active - -# 禁用数据库相关的自动配置 -spring.autoconfigure.exclude=\ - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,\ - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration,\ - org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration,\ - org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration,\ - org.flowable.spring.boot.app.AppEngineAutoConfiguration,\ - org.flowable.spring.boot.ProcessEngineAutoConfiguration,\ - org.flowable.spring.boot.cmmn.CmmnEngineAutoConfiguration,\ - org.flowable.spring.boot.dmn.DmnEngineAutoConfiguration,\ - org.flowable.spring.boot.form.FormEngineAutoConfiguration,\ - org.flowable.spring.boot.content.ContentEngineAutoConfiguration,\ - org.flowable.spring.boot.idm.IdmEngineAutoConfiguration - -# FreeSwitch ESL 测试配置 -freeswitch.esl.host=127.0.0.1 -freeswitch.esl.port=8021 -freeswitch.esl.password=bytedesk123 -freeswitch.esl.timeout=5000 -freeswitch.esl.reconnect.enabled=false - -# WebRTC 测试配置 -freeswitch.webrtc.ws.url=ws://127.0.0.1:15066 -freeswitch.webrtc.wss.url=wss://127.0.0.1:17443 - -# 测试环境禁用自动连接 -freeswitch.esl.auto-connect=false - -# 日志配置 -logging.level.com.bytedesk.freeswitch=DEBUG -logging.level.org.freeswitch.esl=DEBUG diff --git a/plugins/jitsi/.mvn/wrapper/maven-wrapper.jar b/plugins/jitsi/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 21653b6b6a..0000000000 --- a/plugins/jitsi/.mvn/wrapper/maven-wrapper.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e63a53cfb9c4d291ebe3c2b0edacb7622bbc480326beaa5a0456e412f52f066a -size 62547 diff --git a/plugins/jitsi/.mvn/wrapper/maven-wrapper.properties b/plugins/jitsi/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index e70e7bc8d6..0000000000 --- a/plugins/jitsi/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/plugins/jitsi/mvnw b/plugins/jitsi/mvnw deleted file mode 100755 index 66df285428..0000000000 --- a/plugins/jitsi/mvnw +++ /dev/null @@ -1,308 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.2.0 -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /usr/local/etc/mavenrc ] ; then - . /usr/local/etc/mavenrc - fi - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "$(uname)" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME - else - JAVA_HOME="/Library/Java/Home"; export JAVA_HOME - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=$(java-config --jre-home) - fi -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --unix "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --unix "$CLASSPATH") -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && - JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="$(which javac)" - if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=$(which readlink) - if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then - if $darwin ; then - javaHome="$(dirname "\"$javaExecutable\"")" - javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" - else - javaExecutable="$(readlink -f "\"$javaExecutable\"")" - fi - javaHome="$(dirname "\"$javaExecutable\"")" - javaHome=$(expr "$javaHome" : '\(.*\)/bin') - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=$(cd "$wdir/.." || exit 1; pwd) - fi - # end of workaround - done - printf '%s' "$(cd "$basedir" || exit 1; pwd)" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - # Remove \r in case we run on Windows within Git Bash - # and check out the repository with auto CRLF management - # enabled. Otherwise, we may read lines that are delimited with - # \r\n and produce $'-Xarg\r' rather than -Xarg due to word - # splitting rules. - tr -s '\r\n' ' ' < "$1" - fi -} - -log() { - if [ "$MVNW_VERBOSE" = true ]; then - printf '%s\n' "$1" - fi -} - -BASE_DIR=$(find_maven_basedir "$(dirname "$0")") -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -log "$MAVEN_PROJECTBASEDIR" - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" -if [ -r "$wrapperJarPath" ]; then - log "Found $wrapperJarPath" -else - log "Couldn't find $wrapperJarPath, downloading it ..." - - if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - fi - while IFS="=" read -r key value; do - # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) - safeValue=$(echo "$value" | tr -d '\r') - case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; - esac - done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" - log "Downloading from: $wrapperUrl" - - if $cygwin; then - wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") - fi - - if command -v wget > /dev/null; then - log "Found wget ... using wget" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - log "Found curl ... using curl" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - fi - else - log "Falling back to using Java to download" - javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaSource=$(cygpath --path --windows "$javaSource") - javaClass=$(cygpath --path --windows "$javaClass") - fi - if [ -e "$javaSource" ]; then - if [ ! -e "$javaClass" ]; then - log " - Compiling MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/javac" "$javaSource") - fi - if [ -e "$javaClass" ]; then - log " - Running MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -# If specified, validate the SHA-256 sum of the Maven wrapper jar file -wrapperSha256Sum="" -while IFS="=" read -r key value; do - case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; - esac -done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" -if [ -n "$wrapperSha256Sum" ]; then - wrapperSha256Result=false - if command -v sha256sum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - elif command -v shasum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." - echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." - exit 1 - fi - if [ $wrapperSha256Result = false ]; then - echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 - echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 - echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 - exit 1 - fi -fi - -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --windows "$CLASSPATH") - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -# shellcheck disable=SC2086 # safe args -exec "$JAVACMD" \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/plugins/jitsi/mvnw.cmd b/plugins/jitsi/mvnw.cmd deleted file mode 100644 index 95ba6f54ac..0000000000 --- a/plugins/jitsi/mvnw.cmd +++ /dev/null @@ -1,205 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.2.0 -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* -if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %WRAPPER_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file -SET WRAPPER_SHA_256_SUM="" -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B -) -IF NOT %WRAPPER_SHA_256_SUM%=="" ( - powershell -Command "&{"^ - "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ - "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ - " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ - " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ - " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ - " exit 1;"^ - "}"^ - "}" - if ERRORLEVEL 1 goto error -) - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% ^ - %JVM_CONFIG_MAVEN_PROPS% ^ - %MAVEN_OPTS% ^ - %MAVEN_DEBUG_OPTS% ^ - -classpath %WRAPPER_JAR% ^ - "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ - %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" -if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%"=="on" pause - -if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% - -cmd /C exit /B %ERROR_CODE% diff --git a/plugins/jitsi/pom.xml b/plugins/jitsi/pom.xml deleted file mode 100644 index ee77b9453f..0000000000 --- a/plugins/jitsi/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - 4.0.0 - - - com.bytedesk - plugins - ${revision} - - - bytedesk-plugin-jitsi - ${revision} - - bytedesk-plugin-jitsi - https://ai.bytedesk.com - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/jitsi/readme.md b/plugins/jitsi/readme.md deleted file mode 100644 index 3754b07b16..0000000000 --- a/plugins/jitsi/readme.md +++ /dev/null @@ -1,16 +0,0 @@ - -# jitsi - -- jitsi 视频会议插件 diff --git a/plugins/jitsi/readme.zh.md b/plugins/jitsi/readme.zh.md deleted file mode 100644 index 5768b2a7b3..0000000000 --- a/plugins/jitsi/readme.zh.md +++ /dev/null @@ -1,19 +0,0 @@ - -# jitsi - -- jitsi 视频会议插件 -- [docs](https://jitsi.github.io/handbook/docs/intro) -- [github](https://github.com/jitsi/jitsi-meet) -- [官网](https://jitsi.org/jitsi-meet/) diff --git a/plugins/jitsi/src/main/java/com/bytedesk/jitsi/JitsiApplication.java b/plugins/jitsi/src/main/java/com/bytedesk/jitsi/JitsiApplication.java deleted file mode 100644 index d920f883ec..0000000000 --- a/plugins/jitsi/src/main/java/com/bytedesk/jitsi/JitsiApplication.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2025-04-06 09:33:22 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.jitsi; - -// import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class JitsiApplication { - - // public static void main(String[] args) { - // SpringApplication.run(AmazonApplication.class, args); - // } - -} diff --git a/plugins/jitsi/src/main/resources/application.properties b/plugins/jitsi/src/main/resources/application.properties deleted file mode 100644 index dad36baa6d..0000000000 --- a/plugins/jitsi/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=jitsi diff --git a/plugins/jitsi/src/test/java/com/bytedesk/jitsi/JitsiApplicationTests.java b/plugins/jitsi/src/test/java/com/bytedesk/jitsi/JitsiApplicationTests.java deleted file mode 100644 index be74937425..0000000000 --- a/plugins/jitsi/src/test/java/com/bytedesk/jitsi/JitsiApplicationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2025-04-06 09:35:38 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.jitsi; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class JitsiApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/plugins/pom.xml b/plugins/pom.xml index bb5026db2c..8bc2dc8641 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -21,7 +21,7 @@ - remote + kanban diff --git a/plugins/remote/.mvn/wrapper/maven-wrapper.jar b/plugins/remote/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 21653b6b6a..0000000000 --- a/plugins/remote/.mvn/wrapper/maven-wrapper.jar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e63a53cfb9c4d291ebe3c2b0edacb7622bbc480326beaa5a0456e412f52f066a -size 62547 diff --git a/plugins/remote/.mvn/wrapper/maven-wrapper.properties b/plugins/remote/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index e70e7bc8d6..0000000000 --- a/plugins/remote/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/plugins/remote/mvnw b/plugins/remote/mvnw deleted file mode 100755 index 66df285428..0000000000 --- a/plugins/remote/mvnw +++ /dev/null @@ -1,308 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.2.0 -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /usr/local/etc/mavenrc ] ; then - . /usr/local/etc/mavenrc - fi - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "$(uname)" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME - else - JAVA_HOME="/Library/Java/Home"; export JAVA_HOME - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=$(java-config --jre-home) - fi -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --unix "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --unix "$CLASSPATH") -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && - JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="$(which javac)" - if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=$(which readlink) - if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then - if $darwin ; then - javaHome="$(dirname "\"$javaExecutable\"")" - javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" - else - javaExecutable="$(readlink -f "\"$javaExecutable\"")" - fi - javaHome="$(dirname "\"$javaExecutable\"")" - javaHome=$(expr "$javaHome" : '\(.*\)/bin') - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=$(cd "$wdir/.." || exit 1; pwd) - fi - # end of workaround - done - printf '%s' "$(cd "$basedir" || exit 1; pwd)" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - # Remove \r in case we run on Windows within Git Bash - # and check out the repository with auto CRLF management - # enabled. Otherwise, we may read lines that are delimited with - # \r\n and produce $'-Xarg\r' rather than -Xarg due to word - # splitting rules. - tr -s '\r\n' ' ' < "$1" - fi -} - -log() { - if [ "$MVNW_VERBOSE" = true ]; then - printf '%s\n' "$1" - fi -} - -BASE_DIR=$(find_maven_basedir "$(dirname "$0")") -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR -log "$MAVEN_PROJECTBASEDIR" - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" -if [ -r "$wrapperJarPath" ]; then - log "Found $wrapperJarPath" -else - log "Couldn't find $wrapperJarPath, downloading it ..." - - if [ -n "$MVNW_REPOURL" ]; then - wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - else - wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - fi - while IFS="=" read -r key value; do - # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) - safeValue=$(echo "$value" | tr -d '\r') - case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; - esac - done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" - log "Downloading from: $wrapperUrl" - - if $cygwin; then - wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") - fi - - if command -v wget > /dev/null; then - log "Found wget ... using wget" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - else - wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - log "Found curl ... using curl" - [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - else - curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" - fi - else - log "Falling back to using Java to download" - javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" - javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaSource=$(cygpath --path --windows "$javaSource") - javaClass=$(cygpath --path --windows "$javaClass") - fi - if [ -e "$javaSource" ]; then - if [ ! -e "$javaClass" ]; then - log " - Compiling MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/javac" "$javaSource") - fi - if [ -e "$javaClass" ]; then - log " - Running MavenWrapperDownloader.java ..." - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -# If specified, validate the SHA-256 sum of the Maven wrapper jar file -wrapperSha256Sum="" -while IFS="=" read -r key value; do - case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; - esac -done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" -if [ -n "$wrapperSha256Sum" ]; then - wrapperSha256Result=false - if command -v sha256sum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - elif command -v shasum > /dev/null; then - if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then - wrapperSha256Result=true - fi - else - echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." - echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." - exit 1 - fi - if [ $wrapperSha256Result = false ]; then - echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 - echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 - echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 - exit 1 - fi -fi - -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$JAVA_HOME" ] && - JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") - [ -n "$CLASSPATH" ] && - CLASSPATH=$(cygpath --path --windows "$CLASSPATH") - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -# shellcheck disable=SC2086 # safe args -exec "$JAVACMD" \ - $MAVEN_OPTS \ - $MAVEN_DEBUG_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/plugins/remote/mvnw.cmd b/plugins/remote/mvnw.cmd deleted file mode 100644 index 95ba6f54ac..0000000000 --- a/plugins/remote/mvnw.cmd +++ /dev/null @@ -1,205 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.2.0 -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* -if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %WRAPPER_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file -SET WRAPPER_SHA_256_SUM="" -FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B -) -IF NOT %WRAPPER_SHA_256_SUM%=="" ( - powershell -Command "&{"^ - "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ - "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ - " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ - " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ - " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ - " exit 1;"^ - "}"^ - "}" - if ERRORLEVEL 1 goto error -) - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% ^ - %JVM_CONFIG_MAVEN_PROPS% ^ - %MAVEN_OPTS% ^ - %MAVEN_DEBUG_OPTS% ^ - -classpath %WRAPPER_JAR% ^ - "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ - %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" -if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%"=="on" pause - -if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% - -cmd /C exit /B %ERROR_CODE% diff --git a/plugins/remote/pom.xml b/plugins/remote/pom.xml deleted file mode 100644 index accb840fc3..0000000000 --- a/plugins/remote/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - - com.bytedesk - plugins - ${revision} - - - bytedesk-plugin-remote - ${revision} - - bytedesk-plugin-remote - https://ai.bytedesk.com - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/remote/readme.md b/plugins/remote/readme.md deleted file mode 100644 index df46ef7524..0000000000 --- a/plugins/remote/readme.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Remote Desktop - -- [rustdesk](https://github.com/rustdesk/rustdesk) diff --git a/plugins/remote/readme.zh.md b/plugins/remote/readme.zh.md deleted file mode 100644 index a7c2cbd33b..0000000000 --- a/plugins/remote/readme.zh.md +++ /dev/null @@ -1,16 +0,0 @@ - -# 远程桌面 - -- [rustdesk](https://github.com/rustdesk/rustdesk) diff --git a/plugins/remote/src/main/java/com/bytedesk/remote/RemoteApplication.java b/plugins/remote/src/main/java/com/bytedesk/remote/RemoteApplication.java deleted file mode 100644 index e6f21e8ea5..0000000000 --- a/plugins/remote/src/main/java/com/bytedesk/remote/RemoteApplication.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2024-12-09 10:06:33 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.remote; - -// import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class RemoteApplication { - - // public static void main(String[] args) { - // SpringApplication.run(AmazonApplication.class, args); - // } - -} diff --git a/plugins/remote/src/main/resources/application.properties b/plugins/remote/src/main/resources/application.properties deleted file mode 100644 index 9ee4737876..0000000000 --- a/plugins/remote/src/main/resources/application.properties +++ /dev/null @@ -1 +0,0 @@ -spring.application.name=remote diff --git a/plugins/remote/src/test/java/com/bytedesk/remote/RemoteApplicationTests.java b/plugins/remote/src/test/java/com/bytedesk/remote/RemoteApplicationTests.java deleted file mode 100644 index c6b4fcbe22..0000000000 --- a/plugins/remote/src/test/java/com/bytedesk/remote/RemoteApplicationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Author: jackning 270580156@qq.com - * @Date: 2024-08-02 12:19:15 - * @LastEditors: jackning 270580156@qq.com - * @LastEditTime: 2024-12-09 10:07:00 - * @Description: bytedesk.com https://github.com/Bytedesk/bytedesk - * Please be aware of the BSL license restrictions before installing Bytedesk IM – - * selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license. - * Business Source License 1.1: https://github.com/Bytedesk/bytedesk/blob/main/LICENSE - * contact: 270580156@qq.com - * 联系:270580156@qq.com - * Copyright (c) 2024 by bytedesk.com, All Rights Reserved. - */ -package com.bytedesk.remote; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class RemoteApplicationTests { - - @Test - void contextLoads() { - } - -}