Bug fixed

This commit is contained in:
Peng-YM 2020-09-04 21:15:26 +08:00
parent ff89902733
commit 6b97c4c2d7
3 changed files with 67 additions and 52 deletions

View File

@ -21,6 +21,7 @@
<component name="ChangeListManager">
<list default="true" id="8b97a098-48b2-4e64-a9ef-522fe2d30b52" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/sub-store.js" beforeDir="false" afterPath="$PROJECT_DIR$/sub-store.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/../web/src/components/ProxyList.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../web/src/components/ProxyList.vue" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -105,7 +106,7 @@
<workItem from="1599137069057" duration="3450000" />
<workItem from="1599203228508" duration="789000" />
<workItem from="1599206692903" duration="265000" />
<workItem from="1599221746316" duration="642000" />
<workItem from="1599221746316" duration="1334000" />
</task>
<servers />
</component>
@ -125,7 +126,7 @@
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="WindowStateProjectService">
<state width="1322" height="577" key="GridCell.Tab.0.bottom" timestamp="1599221748926">
<state width="1322" height="577" key="GridCell.Tab.0.bottom" timestamp="1599225189820">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.0.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" />
@ -137,8 +138,8 @@
<state width="840" height="374" key="GridCell.Tab.0.bottom/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="1322" height="577" key="GridCell.Tab.0.bottom/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984996" />
<state width="840" height="374" key="GridCell.Tab.0.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="1322" height="577" key="GridCell.Tab.0.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599221748926" />
<state width="1322" height="577" key="GridCell.Tab.0.center" timestamp="1599221748925">
<state width="1322" height="577" key="GridCell.Tab.0.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189820" />
<state width="1322" height="577" key="GridCell.Tab.0.center" timestamp="1599225189819">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.0.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" />
@ -150,8 +151,8 @@
<state width="840" height="374" key="GridCell.Tab.0.center/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="1322" height="577" key="GridCell.Tab.0.center/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984995" />
<state width="840" height="374" key="GridCell.Tab.0.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="1322" height="577" key="GridCell.Tab.0.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599221748925" />
<state width="1322" height="577" key="GridCell.Tab.0.left" timestamp="1599221748925">
<state width="1322" height="577" key="GridCell.Tab.0.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189819" />
<state width="1322" height="577" key="GridCell.Tab.0.left" timestamp="1599225189819">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.0.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358067" />
@ -163,8 +164,8 @@
<state width="840" height="374" key="GridCell.Tab.0.left/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="1322" height="577" key="GridCell.Tab.0.left/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984995" />
<state width="840" height="374" key="GridCell.Tab.0.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266531" />
<state width="1322" height="577" key="GridCell.Tab.0.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599221748925" />
<state width="1322" height="577" key="GridCell.Tab.0.right" timestamp="1599221748926">
<state width="1322" height="577" key="GridCell.Tab.0.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189819" />
<state width="1322" height="577" key="GridCell.Tab.0.right" timestamp="1599225189820">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.0.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358068" />
@ -176,9 +177,9 @@
<state width="840" height="374" key="GridCell.Tab.0.right/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="1322" height="577" key="GridCell.Tab.0.right/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984995" />
<state width="840" height="374" key="GridCell.Tab.0.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598946266532" />
<state width="1322" height="577" key="GridCell.Tab.0.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599221748926" />
<state width="1322" height="577" key="GridCell.Tab.1.bottom" timestamp="1599206984997">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.0.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189820" />
<state width="1322" height="577" key="GridCell.Tab.1.bottom" timestamp="1599225192072">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.1.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
<state width="850" height="374" key="GridCell.Tab.1.bottom/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -189,9 +190,9 @@
<state width="840" height="374" key="GridCell.Tab.1.bottom/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1322" height="577" key="GridCell.Tab.1.bottom/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984997" />
<state width="840" height="374" key="GridCell.Tab.1.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="1322" height="577" key="GridCell.Tab.1.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317878" />
<state width="1322" height="577" key="GridCell.Tab.1.center" timestamp="1599206984996">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.1.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599225192072" />
<state width="1322" height="577" key="GridCell.Tab.1.center" timestamp="1599225192071">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.1.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
<state width="850" height="374" key="GridCell.Tab.1.center/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -202,9 +203,9 @@
<state width="840" height="374" key="GridCell.Tab.1.center/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="1322" height="577" key="GridCell.Tab.1.center/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984996" />
<state width="840" height="374" key="GridCell.Tab.1.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="1322" height="577" key="GridCell.Tab.1.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317877" />
<state width="1322" height="577" key="GridCell.Tab.1.left" timestamp="1599206984996">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.1.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599225192071" />
<state width="1322" height="577" key="GridCell.Tab.1.left" timestamp="1599225192071">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.1.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
<state width="850" height="374" key="GridCell.Tab.1.left/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -215,9 +216,9 @@
<state width="840" height="374" key="GridCell.Tab.1.left/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="1322" height="577" key="GridCell.Tab.1.left/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984996" />
<state width="840" height="374" key="GridCell.Tab.1.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593852" />
<state width="1322" height="577" key="GridCell.Tab.1.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317877" />
<state width="1322" height="577" key="GridCell.Tab.1.right" timestamp="1599206984997">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.1.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599225192071" />
<state width="1322" height="577" key="GridCell.Tab.1.right" timestamp="1599225192072">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.1.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358069" />
<state width="850" height="374" key="GridCell.Tab.1.right/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773766" />
@ -228,9 +229,9 @@
<state width="840" height="374" key="GridCell.Tab.1.right/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305944" />
<state width="1322" height="577" key="GridCell.Tab.1.right/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984997" />
<state width="840" height="374" key="GridCell.Tab.1.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598932593853" />
<state width="1322" height="577" key="GridCell.Tab.1.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317877" />
<state width="1322" height="577" key="GridCell.Tab.2.bottom" timestamp="1599206984999">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.1.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599225192072" />
<state width="1322" height="577" key="GridCell.Tab.2.bottom" timestamp="1599225189727">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.2.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
<state width="850" height="374" key="GridCell.Tab.2.bottom/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -241,9 +242,9 @@
<state width="840" height="374" key="GridCell.Tab.2.bottom/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1322" height="577" key="GridCell.Tab.2.bottom/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984999" />
<state width="1300" height="374" key="GridCell.Tab.2.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="577" key="GridCell.Tab.2.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317878" />
<state width="1322" height="577" key="GridCell.Tab.2.center" timestamp="1599206984998">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.2.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189727" />
<state width="1322" height="577" key="GridCell.Tab.2.center" timestamp="1599225189726">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.2.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
<state width="850" height="374" key="GridCell.Tab.2.center/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -254,9 +255,9 @@
<state width="840" height="374" key="GridCell.Tab.2.center/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1322" height="577" key="GridCell.Tab.2.center/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984998" />
<state width="1300" height="374" key="GridCell.Tab.2.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="1322" height="577" key="GridCell.Tab.2.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317878" />
<state width="1322" height="577" key="GridCell.Tab.2.left" timestamp="1599206984998">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.2.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189726" />
<state width="1322" height="577" key="GridCell.Tab.2.left" timestamp="1599225189726">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.2.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
<state width="850" height="374" key="GridCell.Tab.2.left/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -267,9 +268,9 @@
<state width="840" height="374" key="GridCell.Tab.2.left/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1322" height="577" key="GridCell.Tab.2.left/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984998" />
<state width="1300" height="374" key="GridCell.Tab.2.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="1322" height="577" key="GridCell.Tab.2.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317878" />
<state width="1322" height="577" key="GridCell.Tab.2.right" timestamp="1599206984999">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.2.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189726" />
<state width="1322" height="577" key="GridCell.Tab.2.right" timestamp="1599225189727">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.2.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358070" />
<state width="850" height="374" key="GridCell.Tab.2.right/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -280,9 +281,9 @@
<state width="840" height="374" key="GridCell.Tab.2.right/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1322" height="577" key="GridCell.Tab.2.right/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984999" />
<state width="1300" height="374" key="GridCell.Tab.2.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659636" />
<state width="1322" height="577" key="GridCell.Tab.2.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317878" />
<state width="1322" height="577" key="GridCell.Tab.3.bottom" timestamp="1599206985000">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.2.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189727" />
<state width="1322" height="577" key="GridCell.Tab.3.bottom" timestamp="1599225189727">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.3.bottom/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" />
<state width="850" height="374" key="GridCell.Tab.3.bottom/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773768" />
@ -293,9 +294,9 @@
<state width="840" height="374" key="GridCell.Tab.3.bottom/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305946" />
<state width="1322" height="577" key="GridCell.Tab.3.bottom/69.23.2491.1417@69.23.2491.1417" timestamp="1599206985000" />
<state width="1300" height="374" key="GridCell.Tab.3.bottom/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="577" key="GridCell.Tab.3.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317879" />
<state width="1322" height="577" key="GridCell.Tab.3.center" timestamp="1599206984999">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.3.bottom/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189727" />
<state width="1322" height="577" key="GridCell.Tab.3.center" timestamp="1599225189727">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.3.center/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
<state width="850" height="374" key="GridCell.Tab.3.center/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773768" />
@ -306,9 +307,9 @@
<state width="840" height="374" key="GridCell.Tab.3.center/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1322" height="577" key="GridCell.Tab.3.center/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984999" />
<state width="1300" height="374" key="GridCell.Tab.3.center/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="577" key="GridCell.Tab.3.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317879" />
<state width="1322" height="577" key="GridCell.Tab.3.left" timestamp="1599206984999">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.3.center/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189727" />
<state width="1322" height="577" key="GridCell.Tab.3.left" timestamp="1599225189727">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.3.left/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358071" />
<state width="850" height="374" key="GridCell.Tab.3.left/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773767" />
@ -319,9 +320,9 @@
<state width="840" height="374" key="GridCell.Tab.3.left/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305945" />
<state width="1322" height="577" key="GridCell.Tab.3.left/69.23.2491.1417@69.23.2491.1417" timestamp="1599206984999" />
<state width="1300" height="374" key="GridCell.Tab.3.left/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="577" key="GridCell.Tab.3.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317879" />
<state width="1322" height="577" key="GridCell.Tab.3.right" timestamp="1599206985000">
<screen x="69" y="23" width="2491" height="1417" />
<state width="1322" height="577" key="GridCell.Tab.3.left/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189727" />
<state width="1322" height="577" key="GridCell.Tab.3.right" timestamp="1599225189727">
<screen x="70" y="23" width="2490" height="1417" />
</state>
<state width="840" height="374" key="GridCell.Tab.3.right/0.0.1792.1120@0.0.1792.1120" timestamp="1598115358072" />
<state width="850" height="374" key="GridCell.Tab.3.right/51.23.1741.1097@51.23.1741.1097" timestamp="1598805773768" />
@ -332,7 +333,7 @@
<state width="840" height="374" key="GridCell.Tab.3.right/67.23.1725.1097@67.23.1725.1097" timestamp="1598947305946" />
<state width="1322" height="577" key="GridCell.Tab.3.right/69.23.2491.1417@69.23.2491.1417" timestamp="1599206985000" />
<state width="1300" height="374" key="GridCell.Tab.3.right/70.23.1722.1097@70.23.1722.1097" timestamp="1598931659637" />
<state width="1322" height="577" key="GridCell.Tab.3.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599203317879" />
<state width="1322" height="577" key="GridCell.Tab.3.right/70.23.2490.1417@70.23.2490.1417" timestamp="1599225189727" />
<state x="161" y="268" width="670" height="676" key="search.everywhere.popup" timestamp="1598787117227">
<screen x="53" y="23" width="1739" height="1097" />
</state>

View File

@ -51,11 +51,15 @@ $.info("Initializing Express...");
$app.get("/download/collection/:name", downloadCollection);
$app.get("/download/:name", downloadSub);
// IP_API
$app.get("/api/IP_API/:server", IP_API);
// subscriptions
$app.route("/api/sub/:name").get(getSub).patch(updateSub).delete(deleteSub);
$app.route("/api/sub").get(getAllSubs).post(newSub).delete(deleteAllSubs);
// refresh
$app.post("/api/refresh", refreshResource);
@ -79,6 +83,12 @@ $app.all("/", async (req, res) => {
$.info("Express initialized");
$app.start();
async function IP_API(req, res) {
const server = decodeURIComponent(req.params.server);
const result = await $.http.get(`http://ip-api.com/json/${server}?lang=zh-CN`).then(resp => JSON.parse(resp.body));
res.json(result);
}
/**************************** API -- Subscriptions ***************************************/
// refresh resource
async function refreshResource(req, res) {

View File

@ -37,9 +37,11 @@
</v-card-title>
<v-card-text>
{{info.title}}
{{info.isp}}
<br/>
{{info.subtitle}}
{{info.region}}
<br/>
{{info.ip}}
</v-card-text>
</v-card>
</v-dialog>
@ -60,8 +62,9 @@ export default {
dialog: false,
info: {
name: "",
title: "",
subtitle: "",
isp: "",
region: "",
ip: ""
}
}
},
@ -83,10 +86,11 @@ export default {
async showInfo(idx) {
const {server, name} = this.proxies[idx];
const res = await axios.get(`http://ip-api.com/json/${server}?lang=zh-CN`).then(resp => resp.data);
const res = await axios.get(`/IP_API/${encodeURIComponent(server)}`).then(resp => resp.data);
this.info.name = name;
this.info.title = `地区:${flags.get(res.countryCode)} ${res.regionName} ${res.city}`;
this.info.subtitle = `IP${res.query}`
this.info.isp = `ISP${res.org}`;
this.info.region = `地区:${flags.get(res.countryCode)} ${res.regionName} ${res.city}`;
this.info.ip = `IP${res.query}`
this.dialog = true
},
},