[{"data":1,"prerenderedAt":1467},["ShallowReactive",2],{"navigation_docs_zh_tw":3,"-zh-tw-pml-2-plugin-functions":75,"-zh-tw-pml-2-plugin-functions-surround":1462},[4,26],{"title":5,"path":6,"stem":7,"children":8,"page":25},"PML 2 外掛開發指南","\u002Fzh_tw\u002Fpml-2-plugin","zh_tw\u002Fpml-2-plugin",[9,13,17,21],{"title":10,"path":11,"stem":12},"外掛開發綜述","\u002Fzh_tw\u002Fpml-2-plugin\u002Fintro","zh_tw\u002Fpml-2-plugin\u002F01.intro",{"title":14,"path":15,"stem":16},"外掛系統觸發點說明","\u002Fzh_tw\u002Fpml-2-plugin\u002Ftriggers","zh_tw\u002Fpml-2-plugin\u002F02.triggers",{"title":18,"path":19,"stem":20},"外掛系統運算子說明","\u002Fzh_tw\u002Fpml-2-plugin\u002Foperators","zh_tw\u002Fpml-2-plugin\u002F03.operators",{"title":22,"path":23,"stem":24},"內建函式","\u002Fzh_tw\u002Fpml-2-plugin\u002Ffunctions","zh_tw\u002Fpml-2-plugin\u002F04.functions",false,{"title":27,"path":28,"stem":29,"children":30,"page":25},"PML 2","\u002Fzh_tw\u002Fpml-2","zh_tw\u002Fpml-2",[31,35,39,43,47,51,55,59,63,67,71],{"title":32,"path":33,"stem":34},"介紹 & 下載","\u002Fzh_tw\u002Fpml-2\u002Fintro","zh_tw\u002Fpml-2\u002F01.intro",{"title":36,"path":37,"stem":38},"安裝","\u002Fzh_tw\u002Fpml-2\u002Finstall","zh_tw\u002Fpml-2\u002F02.install",{"title":40,"path":41,"stem":42},"使用者指南","\u002Fzh_tw\u002Fpml-2\u002Fuser_guide","zh_tw\u002Fpml-2\u002F03.user_guide",{"title":44,"path":45,"stem":46},"故障排查","\u002Fzh_tw\u002Fpml-2\u002Ftroubleshooting","zh_tw\u002Fpml-2\u002F04.troubleshooting",{"title":48,"path":49,"stem":50},"設定檔","\u002Fzh_tw\u002Fpml-2\u002Fconfig","zh_tw\u002Fpml-2\u002F05.config",{"title":52,"path":53,"stem":54},"主題","\u002Fzh_tw\u002Fpml-2\u002Fthemes","zh_tw\u002Fpml-2\u002F06.themes",{"title":56,"path":57,"stem":58},"Plugin","\u002Fzh_tw\u002Fpml-2\u002Fplugin","zh_tw\u002Fpml-2\u002F07.plugin",{"title":60,"path":61,"stem":62},"PML 2 隱私權政策","\u002Fzh_tw\u002Fpml-2\u002Fpolicy","zh_tw\u002Fpml-2\u002F08.policy",{"title":64,"path":65,"stem":66},"PML 2 使用者條款","\u002Fzh_tw\u002Fpml-2\u002Fuser_agreement","zh_tw\u002Fpml-2\u002F09.user_agreement",{"title":68,"path":69,"stem":70},"DNS 供應商","\u002Fzh_tw\u002Fpml-2\u002Fdns_providers","zh_tw\u002Fpml-2\u002F10.dns_providers",{"title":72,"path":73,"stem":74},"遙測","\u002Fzh_tw\u002Fpml-2\u002Ftelemetry","zh_tw\u002Fpml-2\u002F11.telemetry",{"id":76,"title":22,"body":77,"description":1456,"extension":1457,"links":1458,"meta":1459,"navigation":1362,"path":23,"seo":1460,"stem":24,"__hash__":1461},"docs_zh_tw\u002Fzh_tw\u002Fpml-2-plugin\u002F04.functions.md",{"type":78,"value":79,"toc":1440},"minimark",[80,85,107,114,117,121,124,191,199,203,317,321,329,466,472,476,490,809,815,961,981,985,997,1062,1087,1091,1100,1233,1239,1243,1250,1436],[81,82,84],"h2",{"id":83},"一內建函式概述","一、內建函式概述",[86,87,88,89,93,94,97,98,102,103,106],"p",{},"函式庫是 PML 2 外掛系統的重要組成部分。在撰寫外掛時, 你可以在",[90,91,92],"strong",{},"條件表達式","與",[90,95,96],{},"動作參數樣板","中直接呼叫內建函式, 對 ",[99,100,101],"code",{},"ctx.data","、",[99,104,105],{},"ctx.variables"," 等情境資料進行加工、計算與判斷, 而無需撰寫任何程式碼。",[86,108,109,110,113],{},"內建函式由表達式求值器統一提供, 涵蓋字串與集合處理、數學運算、三角函式、日期時間操作等方面。函式名請統一使用",[90,111,112],{},"小寫","書寫, 參數按需取值, 支援字串、數值與集合型別。",[86,115,116],{},"以下介紹中, 函式旁的版本標記表示該函式自對應版本及以上的 PML 2 中可用。請根據實際使用的 PML 2 版本選擇合適的函式。",[118,119,120],"h3",{"id":120},"呼叫位置",[86,122,123],{},"內建函式可以出現在兩類位置:",[125,126,127,143],"table",{},[128,129,130],"thead",{},[131,132,133,137,140],"tr",{},[134,135,136],"th",{},"位置",[134,138,139],{},"寫法",[134,141,142],{},"範例",[144,145,146,171],"tbody",{},[131,147,148,156,166],{},[149,150,151,152,155],"td",{},"條件表達式 (",[99,153,154],{},"condition",")",[149,157,158,159,162,163],{},"直接書寫表達式, ",[90,160,161],{},"不使用"," ",[99,164,165],{},"{{ }}",[149,167,168],{},[99,169,170],{},"len(ctx.data.proxyName) > 0 -and upper(ctx.data.proxyName) -eq 'WEB'",[131,172,173,179,186],{},[149,174,175,176,155],{},"動作參數樣板 (",[99,177,178],{},"params",[149,180,181,182,185],{},"使用 ",[99,183,184],{},"{{ 表達式 }}"," 包裹, 一個字串內可嵌入多個樣板",[149,187,188],{},[99,189,190],{},"msg: \"隧道 {{ctx.data.proxyName}} 已啟動 (長度 {{len(ctx.data.proxyName)}})\"",[192,193,194,195,198],"warning",{},"若函式名未知, 或參數個數 \u002F 型別不合法, 表達式求值會擲出例外。外掛引擎會將其記錄為日誌, ",[90,196,197],{},"不會導致應用程式崩潰",", 但該筆觸發器的本次執行會失敗。請務必核對函式名與參數個數。",[81,200,202],{"id":201},"二內建函式分類","二、內建函式分類",[125,204,205,215],{},[128,206,207],{},[131,208,209,212],{},[134,210,211],{},"分類",[134,213,214],{},"函式",[144,216,217,236,279,304],{},[131,218,219,222],{},[149,220,221],{},"字串與集合函式",[149,223,224,102,227,102,230,102,233],{},[99,225,226],{},"len",[99,228,229],{},"lower",[99,231,232],{},"upper",[99,234,235],{},"coalesce",[131,237,238,241],{},[149,239,240],{},"數學函式",[149,242,243,102,246,102,249,102,252,102,255,102,258,102,261,102,264,102,267,102,270,102,273,102,276],{},[99,244,245],{},"abs",[99,247,248],{},"round",[99,250,251],{},"floor",[99,253,254],{},"ceil",[99,256,257],{},"sqrt",[99,259,260],{},"pow",[99,262,263],{},"min",[99,265,266],{},"max",[99,268,269],{},"ln",[99,271,272],{},"log10",[99,274,275],{},"log2",[99,277,278],{},"log",[131,280,281,284],{},[149,282,283],{},"三角函式",[149,285,286,102,289,102,292,102,295,102,298,102,301],{},[99,287,288],{},"sin",[99,290,291],{},"cos",[99,293,294],{},"tan",[99,296,297],{},"cot",[99,299,300],{},"sec",[99,302,303],{},"csc",[131,305,306,309],{},[149,307,308],{},"日期時間函式",[149,310,311,102,314],{},[99,312,313],{},"now",[99,315,316],{},"datetime.now.strftime",[81,318,320],{"id":319},"三內建函式詳細介紹","三、內建函式詳細介紹",[118,322,324,325],{"id":323},"_1-字串與集合函式-2631","1. 字串與集合函式 ",[326,327,328],"badge",{},"26.3.1",[125,330,331,347],{},[128,332,333],{},[131,334,335,338,341,344],{},[134,336,337],{},"函式名",[134,339,340],{},"參數",[134,342,343],{},"說明",[134,345,346],{},"用例",[144,348,349,388,414,438],{},[131,350,351,356,362,373],{},[149,352,353],{},[99,354,355],{},"len(x)",[149,357,358,361],{},[99,359,360],{},"x",": 任意",[149,363,364,365,368,369,372],{},"傳回長度或元素個數。",[99,366,367],{},"null"," 傳回 ",[99,370,371],{},"0","; 字串傳回字元數; 集合傳回元素個數; 其他型別傳回其字串表示的長度。",[149,374,375,368,378,381,384,387],{},[99,376,377],{},"len(\"abcd\")",[99,379,380],{},"4",[382,383],"br",{},[99,385,386],{},"len(ctx.variables.list)"," 傳回集合元素個數",[131,389,390,395,400,406],{},[149,391,392],{},[99,393,394],{},"lower(s)",[149,396,397,361],{},[99,398,399],{},"s",[149,401,402,403,405],{},"轉為字串並轉換為小寫。",[99,404,367],{}," 傳回空字串。",[149,407,408,368,411],{},[99,409,410],{},"lower(\"Web\")",[99,412,413],{},"\"web\"",[131,415,416,421,425,430],{},[149,417,418],{},[99,419,420],{},"upper(s)",[149,422,423,361],{},[99,424,399],{},[149,426,427,428,405],{},"轉為字串並轉換為大寫。",[99,429,367],{},[149,431,432,368,435],{},[99,433,434],{},"upper(\"Web\")",[99,436,437],{},"\"WEB\"",[131,439,440,445,448,457],{},[149,441,442],{},[99,443,444],{},"coalesce(a, b, ...)",[149,446,447],{},"1 個及以上",[149,449,450,451,453,454,456],{},"傳回第一個既不為 ",[99,452,367],{}," 也不為空字串的參數; 若全部為空則傳回 ",[99,455,367],{},"。常用於為缺少的欄位提供預設值。",[149,458,459,462,463],{},[99,460,461],{},"coalesce(ctx.data.errorCategory, \"timeout\")"," 在欄位缺少時傳回 ",[99,464,465],{},"\"timeout\"",[467,468,469,471],"tip",{},[99,470,226],{}," 對字串與集合都有效, 因此可以用同一個函式判斷隧道名稱長度或清單元素個數。",[118,473,475],{"id":474},"_2-數學函式","2. 數學函式",[86,477,478,102,480,482,483,485,486,489],{},[99,479,263],{},[99,481,266],{}," 自 ",[326,484,328],{}," 起可用, 其餘數學函式自 ",[326,487,488],{},"26.5"," 起可用。所有數學函式都要求參數能解析為數值, 否則會擲出例外。",[125,491,492,504],{},[128,493,494],{},[131,495,496,498,500,502],{},[134,497,337],{},[134,499,340],{},[134,501,343],{},[134,503,346],{},[144,505,506,532,565,589,613,637,667,687,706,730,755,779],{},[131,507,508,513,518,524],{},[149,509,510],{},[99,511,512],{},"abs(x)",[149,514,515,517],{},[99,516,360],{},": 數值",[149,519,520,521,523],{},"傳回 ",[99,522,360],{}," 的絕對值。",[149,525,526,368,529],{},[99,527,528],{},"abs(-5)",[99,530,531],{},"5",[131,533,534,539,543,550],{},[149,535,536],{},[99,537,538],{},"round(x)",[149,540,541,517],{},[99,542,360],{},[149,544,545,546,549],{},"傳回四捨六入五成雙的結果 (銀行家捨入, 即 .NET 預設的 ",[99,547,548],{},"MidpointRounding.ToEven",")。",[149,551,552,368,555,557,559,368,562],{},[99,553,554],{},"round(4.5)",[99,556,380],{},[382,558],{},[99,560,561],{},"round(5.5)",[99,563,564],{},"6",[131,566,567,572,576,582],{},[149,568,569],{},[99,570,571],{},"floor(x)",[149,573,574,517],{},[99,575,360],{},[149,577,578,579,581],{},"傳回小於或等於 ",[99,580,360],{}," 的最大整數。",[149,583,584,368,587],{},[99,585,586],{},"floor(4.9)",[99,588,380],{},[131,590,591,596,600,606],{},[149,592,593],{},[99,594,595],{},"ceil(x)",[149,597,598,517],{},[99,599,360],{},[149,601,602,603,605],{},"傳回大於或等於 ",[99,604,360],{}," 的最小整數。",[149,607,608,368,611],{},[99,609,610],{},"ceil(4.2)",[99,612,531],{},[131,614,615,620,624,629],{},[149,616,617],{},[99,618,619],{},"sqrt(x)",[149,621,622,517],{},[99,623,360],{},[149,625,520,626,628],{},[99,627,360],{}," 的平方根。",[149,630,631,368,634],{},[99,632,633],{},"sqrt(9)",[99,635,636],{},"3",[131,638,639,644,651,659],{},[149,640,641],{},[99,642,643],{},"pow(x, y)",[149,645,646,102,648,517],{},[99,647,360],{},[99,649,650],{},"y",[149,652,520,653,655,656,658],{},[99,654,360],{}," 的 ",[99,657,650],{}," 次方。",[149,660,661,368,664],{},[99,662,663],{},"pow(2, 10)",[99,665,666],{},"1024",[131,668,669,674,677,680],{},[149,670,671],{},[99,672,673],{},"min(a, b, ...)",[149,675,676],{},"2 個及以上數值",[149,678,679],{},"傳回最小值。",[149,681,682,368,685],{},[99,683,684],{},"min(3, 5)",[99,686,636],{},[131,688,689,694,696,699],{},[149,690,691],{},[99,692,693],{},"max(a, b, ...)",[149,695,676],{},[149,697,698],{},"傳回最大值。",[149,700,701,368,704],{},[99,702,703],{},"max(3, 5)",[99,705,531],{},[131,707,708,713,717,723],{},[149,709,710],{},[99,711,712],{},"ln(x)",[149,714,715,517],{},[99,716,360],{},[149,718,719,720,549],{},"傳回自然對數 (底數為 ",[99,721,722],{},"e",[149,724,725,368,728],{},[99,726,727],{},"ln(1)",[99,729,371],{},[131,731,732,737,741,747],{},[149,733,734],{},[99,735,736],{},"log10(x)",[149,738,739,517],{},[99,740,360],{},[149,742,743,744,549],{},"傳回常用對數 (底數為 ",[99,745,746],{},"10",[149,748,749,368,752],{},[99,750,751],{},"log10(100)",[99,753,754],{},"2",[131,756,757,762,766,772],{},[149,758,759],{},[99,760,761],{},"log2(x)",[149,763,764,517],{},[99,765,360],{},[149,767,768,769,771],{},"傳回底數為 ",[99,770,754],{}," 的對數。",[149,773,774,368,777],{},[99,775,776],{},"log2(8)",[99,778,636],{},[131,780,781,786,793,802],{},[149,782,783],{},[99,784,785],{},"log(x, base)",[149,787,788,102,790,517],{},[99,789,360],{},[99,791,792],{},"base",[149,794,795,796,798,799,801],{},"傳回指定底數的對數, ",[99,797,792],{}," 必須大於 ",[99,800,371],{},"。",[149,803,804,368,807],{},[99,805,806],{},"log(8, 2)",[99,808,636],{},[118,810,812,813],{"id":811},"_3-三角函式-265","3. 三角函式 ",[326,814,488],{},[125,816,817,829],{},[128,818,819],{},[131,820,821,823,825,827],{},[134,822,337],{},[134,824,340],{},[134,826,343],{},[134,828,346],{},[144,830,831,852,874,895,917,939],{},[131,832,833,838,842,845],{},[149,834,835],{},[99,836,837],{},"sin(x)",[149,839,840,517],{},[99,841,360],{},[149,843,844],{},"傳回正弦值。",[149,846,847,368,850],{},[99,848,849],{},"sin(0)",[99,851,371],{},[131,853,854,859,863,866],{},[149,855,856],{},[99,857,858],{},"cos(x)",[149,860,861,517],{},[99,862,360],{},[149,864,865],{},"傳回餘弦值。",[149,867,868,368,871],{},[99,869,870],{},"cos(0)",[99,872,873],{},"1",[131,875,876,881,885,888],{},[149,877,878],{},[99,879,880],{},"tan(x)",[149,882,883,517],{},[99,884,360],{},[149,886,887],{},"傳回正切值。",[149,889,890,368,893],{},[99,891,892],{},"tan(0)",[99,894,371],{},[131,896,897,902,906,912],{},[149,898,899],{},[99,900,901],{},"cot(x)",[149,903,904,517],{},[99,905,360],{},[149,907,908,909,801],{},"傳回餘切值, 即 ",[99,910,911],{},"1 \u002F tan(x)",[149,913,914],{},[99,915,916],{},"cot(1)",[131,918,919,924,928,934],{},[149,920,921],{},[99,922,923],{},"sec(x)",[149,925,926,517],{},[99,927,360],{},[149,929,930,931,801],{},"傳回正割值, 即 ",[99,932,933],{},"1 \u002F cos(x)",[149,935,936],{},[99,937,938],{},"sec(1)",[131,940,941,946,950,956],{},[149,942,943],{},[99,944,945],{},"csc(x)",[149,947,948,517],{},[99,949,360],{},[149,951,952,953,801],{},"傳回餘割值, 即 ",[99,954,955],{},"1 \u002F sin(x)",[149,957,958],{},[99,959,960],{},"csc(1)",[962,963,964,965,968,969,972,973,976,977,980],"note",{},"三角函數參數預設採用",[90,966,967],{},"角度制","。若第二個參數傳入 ",[99,970,971],{},"\"true\"","，則會以",[90,974,975],{},"弧度制","進行計算。求值前會先將參數中的 ",[99,978,979],{},"\\pi"," 替換為圓周率 π 的數值，以便書寫含 π 的常數。",[118,982,984],{"id":983},"_4-日期時間函式","4. 日期時間函式",[86,986,987,482,989,991,992,482,994,996],{},[99,988,313],{},[326,990,328],{}," 起可用, ",[99,993,316],{},[326,995,488],{}," 起可用。",[125,998,999,1011],{},[128,1000,1001],{},[131,1002,1003,1005,1007,1009],{},[134,1004,337],{},[134,1006,340],{},[134,1008,343],{},[134,1010,346],{},[144,1012,1013,1032],{},[131,1014,1015,1019,1022,1025],{},[149,1016,1017],{},[99,1018,313],{},[149,1020,1021],{},"無",[149,1023,1024],{},"傳回目前 UTC 時間的 Unix 時間戳記 (秒)。",[149,1026,1027,368,1029],{},[99,1028,313],{},[99,1030,1031],{},"1759456000",[131,1033,1034,1039,1045,1054],{},[149,1035,1036],{},[99,1037,1038],{},"datetime.now.strftime(format)",[149,1040,1041,1044],{},[99,1042,1043],{},"format"," (選填): 字串",[149,1046,1047,1048,1050,1051,801],{},"傳回目前本機時間的格式化字串; 省略 ",[99,1049,1043],{}," 時使用 ",[99,1052,1053],{},"yyyy-MM-dd HH:mm:ss",[149,1055,1056,368,1059],{},[99,1057,1058],{},"datetime.now.strftime(\"yyyy\u002FMM\u002Fdd\")",[99,1060,1061],{},"2026\u002F10\u002F03",[1063,1064,1065,1067,1068,1071,1072,1079,1080,1083,1084,1086],"caution",{},[99,1066,316],{}," 的名稱雖然包含 ",[99,1069,1070],{},"strftime",", 但其格式化字串遵循 .NET 的",[1073,1074,1078],"a",{"href":1075,"rel":1076},"https:\u002F\u002Flearn.microsoft.com\u002Fzh-tw\u002Fdotnet\u002Fstandard\u002Fbase-types\u002Fcustom-date-and-time-format-strings",[1077],"nofollow","自訂日期與時間格式字串",", ",[90,1081,1082],{},"不是"," Python \u002F C 的 ",[99,1085,1070],{}," 語法。",[81,1088,1090],{"id":1089},"四算術運算子","四、算術運算子",[86,1092,1093,1094,1097,1098,996],{},"除了函式呼叫, PML 2 的表達式還支援算術運算, 並可用括號 ",[99,1095,1096],{},"()"," 改變優先順序。算術運算子自 ",[326,1099,328],{},[125,1101,1102,1113],{},[128,1103,1104],{},[131,1105,1106,1109,1111],{},[134,1107,1108],{},"運算子",[134,1110,343],{},[134,1112,142],{},[144,1114,1115,1130,1145,1160,1178,1195,1216],{},[131,1116,1117,1122,1125],{},[149,1118,1119],{},[99,1120,1121],{},"+",[149,1123,1124],{},"加法, 計算左右兩邊的和。",[149,1126,1127],{},[99,1128,1129],{},"ctx.variables.count + 5",[131,1131,1132,1137,1140],{},[149,1133,1134],{},[99,1135,1136],{},"-",[149,1138,1139],{},"減法, 計算左右兩邊的差。",[149,1141,1142],{},[99,1143,1144],{},"ctx.variables.count - 5",[131,1146,1147,1152,1155],{},[149,1148,1149],{},[99,1150,1151],{},"*",[149,1153,1154],{},"乘法, 計算左右兩邊的積。",[149,1156,1157],{},[99,1158,1159],{},"ctx.variables.count * 5",[131,1161,1162,1167,1170],{},[149,1163,1164],{},[99,1165,1166],{},"\u002F",[149,1168,1169],{},"除法, 計算左右兩邊的商 (浮點除法)。",[149,1171,1172,368,1175],{},[99,1173,1174],{},"5 \u002F 2",[99,1176,1177],{},"2.5",[131,1179,1180,1185,1188],{},[149,1181,1182],{},[99,1183,1184],{},"%",[149,1186,1187],{},"取模, 計算左右兩邊的餘數。",[149,1189,1190,368,1193],{},[99,1191,1192],{},"7 % 3",[99,1194,873],{},[131,1196,1197,1206,1209],{},[149,1198,1199,1202,1203],{},[99,1200,1201],{},"**"," 或 ",[99,1204,1205],{},"^",[149,1207,1208],{},"冪運算, 計算左邊的值的右邊的値次方。",[149,1210,1211,368,1214],{},[99,1212,1213],{},"2 ** 10",[99,1215,666],{},[131,1217,1218,1223,1226],{},[149,1219,1220],{},[99,1221,1222],{},"\u002F\u002F",[149,1224,1225],{},"整數除法, 計算左右兩邊的商的向下取整。",[149,1227,1228,368,1231],{},[99,1229,1230],{},"7 \u002F\u002F 2",[99,1232,636],{},[962,1234,1235,1236,801],{},"算術運算子要求數值運算元; 若運算元為字串, 會先嘗試將其解析為數值, 解析失敗則擲出例外。算術運算子與內建函式可以自由組合, 例如 ",[99,1237,1238],{},"max(len(ctx.data.proxyName), 3) * 2",[81,1240,1242],{"id":1241},"五完整範例","五、完整範例",[86,1244,1245,1246,1249],{},"以下範例摘自官方範例外掛 ",[99,1247,1248],{},"tech.rycb.plugin.demo-functions.yaml",", 示範內建函式與算術運算在條件表達式與動作參數樣板中的用法:",[1251,1252,1257],"pre",{"className":1253,"code":1254,"language":1255,"meta":1256,"style":1256},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","triggers:\n  # 隧道名稱長度大於 0 且忽略大小寫等於 web 時記錄日誌\n  - on: proxy.start\n    condition: \"len(ctx.data.proxyName) > 0 -and upper(ctx.data.proxyName) -eq 'WEB'\"\n    actions:\n      - name: log\n        params:\n          msg: \"隧道 {{ctx.data.proxyName}} 已啟動 (名稱長度 {{len(ctx.data.proxyName)}})\"\n\n  # 失敗分類缺少時視為 timeout, 且重試次數不超過 3 次才通知\n  - on: proxy.failed\n    condition: \"coalesce(ctx.data.errorCategory, 'timeout') -eq 'timeout' -and min(ctx.variables.retryCount, 3) -le 3\"\n    actions:\n      - name: notify\n        params:\n          msg: \"隧道 {{ctx.data.proxyName}} 失敗: {{ctx.data.errorMessage}}\"\n","yaml","",[99,1258,1259,1272,1279,1296,1312,1320,1334,1342,1357,1364,1370,1382,1396,1403,1415,1422],{"__ignoreMap":1256},[1260,1261,1264,1268],"span",{"class":1262,"line":1263},"line",1,[1260,1265,1267],{"class":1266},"swJcz","triggers",[1260,1269,1271],{"class":1270},"sMK4o",":\n",[1260,1273,1275],{"class":1262,"line":1274},2,[1260,1276,1278],{"class":1277},"sHwdD","  # 隧道名稱長度大於 0 且忽略大小寫等於 web 時記錄日誌\n",[1260,1280,1282,1285,1289,1292],{"class":1262,"line":1281},3,[1260,1283,1284],{"class":1270},"  -",[1260,1286,1288],{"class":1287},"sfNiH"," on",[1260,1290,1291],{"class":1270},":",[1260,1293,1295],{"class":1294},"sfazB"," proxy.start\n",[1260,1297,1299,1302,1304,1307,1309],{"class":1262,"line":1298},4,[1260,1300,1301],{"class":1266},"    condition",[1260,1303,1291],{"class":1270},[1260,1305,1306],{"class":1270}," \"",[1260,1308,170],{"class":1294},[1260,1310,1311],{"class":1270},"\"\n",[1260,1313,1315,1318],{"class":1262,"line":1314},5,[1260,1316,1317],{"class":1266},"    actions",[1260,1319,1271],{"class":1270},[1260,1321,1323,1326,1329,1331],{"class":1262,"line":1322},6,[1260,1324,1325],{"class":1270},"      -",[1260,1327,1328],{"class":1266}," name",[1260,1330,1291],{"class":1270},[1260,1332,1333],{"class":1294}," log\n",[1260,1335,1337,1340],{"class":1262,"line":1336},7,[1260,1338,1339],{"class":1266},"        params",[1260,1341,1271],{"class":1270},[1260,1343,1345,1348,1350,1352,1355],{"class":1262,"line":1344},8,[1260,1346,1347],{"class":1266},"          msg",[1260,1349,1291],{"class":1270},[1260,1351,1306],{"class":1270},[1260,1353,1354],{"class":1294},"隧道 {{ctx.data.proxyName}} 已啟動 (名稱長度 {{len(ctx.data.proxyName)}})",[1260,1356,1311],{"class":1270},[1260,1358,1360],{"class":1262,"line":1359},9,[1260,1361,1363],{"emptyLinePlaceholder":1362},true,"\n",[1260,1365,1367],{"class":1262,"line":1366},10,[1260,1368,1369],{"class":1277},"  # 失敗分類缺少時視為 timeout, 且重試次數不超過 3 次才通知\n",[1260,1371,1373,1375,1377,1379],{"class":1262,"line":1372},11,[1260,1374,1284],{"class":1270},[1260,1376,1288],{"class":1287},[1260,1378,1291],{"class":1270},[1260,1380,1381],{"class":1294}," proxy.failed\n",[1260,1383,1385,1387,1389,1391,1394],{"class":1262,"line":1384},12,[1260,1386,1301],{"class":1266},[1260,1388,1291],{"class":1270},[1260,1390,1306],{"class":1270},[1260,1392,1393],{"class":1294},"coalesce(ctx.data.errorCategory, 'timeout') -eq 'timeout' -and min(ctx.variables.retryCount, 3) -le 3",[1260,1395,1311],{"class":1270},[1260,1397,1399,1401],{"class":1262,"line":1398},13,[1260,1400,1317],{"class":1266},[1260,1402,1271],{"class":1270},[1260,1404,1406,1408,1410,1412],{"class":1262,"line":1405},14,[1260,1407,1325],{"class":1270},[1260,1409,1328],{"class":1266},[1260,1411,1291],{"class":1270},[1260,1413,1414],{"class":1294}," notify\n",[1260,1416,1418,1420],{"class":1262,"line":1417},15,[1260,1419,1339],{"class":1266},[1260,1421,1271],{"class":1270},[1260,1423,1425,1427,1429,1431,1434],{"class":1262,"line":1424},16,[1260,1426,1347],{"class":1266},[1260,1428,1291],{"class":1270},[1260,1430,1306],{"class":1270},[1260,1432,1433],{"class":1294},"隧道 {{ctx.data.proxyName}} 失敗: {{ctx.data.errorMessage}}",[1260,1435,1311],{"class":1270},[1437,1438,1439],"style",{},"html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":1256,"searchDepth":1274,"depth":1274,"links":1441},[1442,1445,1446,1454,1455],{"id":83,"depth":1274,"text":84,"children":1443},[1444],{"id":120,"depth":1281,"text":120},{"id":201,"depth":1274,"text":202},{"id":319,"depth":1274,"text":320,"children":1447},[1448,1450,1451,1453],{"id":323,"depth":1281,"text":1449},"1. 字串與集合函式 26.3.1",{"id":474,"depth":1281,"text":475},{"id":811,"depth":1281,"text":1452},"3. 三角函式 26.5",{"id":983,"depth":1281,"text":984},{"id":1089,"depth":1274,"text":1090},{"id":1241,"depth":1274,"text":1242},"本文將介紹 PML 2 外掛系統中條件與動作樣板可用的內建函式與算術運算子。","md",null,{},{"title":22,"description":1456},"Z9l7G3vNU0M1ba_LwwbuL2de4itP89mrs2q0faYXZLI",[1463,1465],{"title":18,"path":19,"stem":20,"description":1464,"children":-1},"本文件介紹 PML 2 外掛系統的運算子。",{"title":32,"path":33,"stem":34,"description":1466,"children":-1},"PML 2 是 ME Frp 的第三方客戶端之一, 橫跨多架構、多平台, 提供簡單便捷的操作, 可以快速啟動隧道。",1791004266159]