fix:修改了api 地址
This commit is contained in:
parent
f5d23a68c3
commit
afbb74f823
16
.env
16
.env
@ -1,11 +1,11 @@
|
|||||||
IS_DEBUG="true"
|
IS_DEBUG="true"
|
||||||
GRPC_ENDPOINT="10.66.66.234:9090"
|
GRPC_ENDPOINT="10.66.66.230:9090"
|
||||||
COSMOS_ENDPOINT="http://10.66.66.234:26657"
|
COSMOS_ENDPOINT="http://10.66.66.230:26657"
|
||||||
ACCOUNT_NAME="ccvdexre"
|
ACCOUNT_NAME="gmkrucb5apcmq"
|
||||||
TRAFFIC_OBFUSCATE="10.66.66.234:8180"
|
TRAFFIC_OBFUSCATE="10.66.66.230:8180"
|
||||||
NODE_SECRET= "initial typical business width enforce buddy magic country piano head cable blossom gate caught disagree pepper moral pair vessel protect mixture deposit artwork liquid"
|
NODE_SECRET= "horror fence lecture sunset tunnel badge strategy curtain boat wonder police junior spider attack favorite farm trade chicken violin dust strike clap clutch toilet"
|
||||||
VIET_EVENTS_URL="ws://10.66.66.234:8080/events"
|
VIET_EVENTS_URL="ws://10.66.66.230:8080/events"
|
||||||
VITE_BASE_URL="http://10.66.66.234:8080"
|
VITE_BASE_URL="http://10.66.66.230:8080"
|
||||||
VITE_BLOCK_URL="http://10.66.66.234:1317"
|
VITE_BLOCK_URL="http://10.66.66.230:1317"
|
||||||
NODE_OPTIONS=--max-old-space-size=8192
|
NODE_OPTIONS=--max-old-space-size=8192
|
||||||
# $env:NODE_OPTIONS="--max-old-space-size=8192"; pnpm run web:build
|
# $env:NODE_OPTIONS="--max-old-space-size=8192"; pnpm run web:build
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -150,31 +150,33 @@ const NewHome = () => {
|
|||||||
}, [dataInfo.applicationDiversion]);
|
}, [dataInfo.applicationDiversion]);
|
||||||
|
|
||||||
// 处理代理开关
|
// 处理代理开关
|
||||||
const handleProxyToggle = async (
|
const handleProxyToggle = useCallback(
|
||||||
isProxyEnabled: boolean,
|
async (isProxyEnabled: boolean, isCoreRunning: boolean) => {
|
||||||
isCoreRunning: boolean
|
// console.log(isProxyLoading, "isProxyLoadingisProxyLoading");
|
||||||
) => {
|
if (isProxyLoading) return;
|
||||||
if (isProxyLoading) return;
|
try {
|
||||||
try {
|
// 如果核心未运行,先启动核心
|
||||||
// 如果核心未运行,先启动核心
|
if (!isCoreRunning) {
|
||||||
if (!isCoreRunning) {
|
await commands.startCore();
|
||||||
await commands.startCore();
|
}
|
||||||
|
|
||||||
|
setIsProxyLoading(true);
|
||||||
|
// 切换代理状态
|
||||||
|
await dispatch(isProxyEnabled ? disableProxy() : enableProxy()).unwrap();
|
||||||
|
setIsProxyLoading(false);
|
||||||
|
console.log(`Proxy ${isProxyEnabled ? "关闭成功" : "开启成功"}`);
|
||||||
|
} catch (error) {
|
||||||
|
const errorMessage = isProxyEnabled
|
||||||
|
? "关闭代理失败!"
|
||||||
|
: "开启代理失败,请检查节点配置、或重新尝试开启";
|
||||||
|
errorToast(errorMessage, toast);
|
||||||
|
console.error("Proxy toggle failed:", error);
|
||||||
|
} finally {
|
||||||
|
setIsProxyLoading(false);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
setIsProxyLoading(true);
|
[dispatch, isProxyLoading, isCoreRunning, isProxyEnabled]
|
||||||
// 切换代理状态
|
);
|
||||||
await dispatch(isProxyEnabled ? disableProxy() : enableProxy()).unwrap();
|
|
||||||
} catch (error) {
|
|
||||||
const errorMessage = isProxyEnabled
|
|
||||||
? "关闭代理失败!"
|
|
||||||
: "开启代理失败,请检查节点配置、或重新尝试开启";
|
|
||||||
errorToast(errorMessage, toast);
|
|
||||||
console.error("Proxy toggle failed:", error);
|
|
||||||
} finally {
|
|
||||||
setIsProxyLoading(false);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const initData = async () => {
|
const initData = async () => {
|
||||||
const passAuthentication = await getPassAuthentication();
|
const passAuthentication = await getPassAuthentication();
|
||||||
const trafficObfuscation = await getTrafficObfuscation();
|
const trafficObfuscation = await getTrafficObfuscation();
|
||||||
|
|||||||
@ -51,7 +51,6 @@ export const stopCore = createAsyncThunk(
|
|||||||
)
|
)
|
||||||
|
|
||||||
export const enableProxy = createAsyncThunk('service/enableProxy', async () => {
|
export const enableProxy = createAsyncThunk('service/enableProxy', async () => {
|
||||||
console.log("开启代理了?")
|
|
||||||
const result = await commands.enableProxy()
|
const result = await commands.enableProxy()
|
||||||
return result
|
return result
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user