Compare commits

...

224 Commits
v1.7.3 ... main

Author SHA1 Message Date
e201281c36 Update version to v1.17.1 2025-01-27 11:39:10 +08:00
cbd81f92f4 Update activity 2025-01-27 11:34:47 +08:00
dplek
f364754092
Update missing stuff to v5.3 (#240)
* Update Quest to v5.3

* Update Activity.txt to v5.3
2025-01-27 11:29:47 +08:00
8b760e5e9b Fix page order issue 2025-01-13 18:57:09 +08:00
3b2bfbb0e6 Update version to v1.17.0 2025-01-13 18:50:10 +08:00
2c8691e9ae Update resources to 5.3
Include Achievement, Avatar, Cutscene, Dungeon, BannerTitle, Gadget, Item, Monster, Scene, Weapon...
2025-01-13 18:48:24 +08:00
剧毒的KCN
e6a2d26671
Fix ListBox overflow on high DPI (#235) 2024-09-07 21:35:50 +08:00
fafff8090f Fix height issue of nav list items on high dpi 2024-09-07 20:44:23 +08:00
Amireux
b37016a49c
Added 5.0 Banners (#232)
Some checks failed
Build project / build (push) Has been cancelled
Added missing event IDs
Added 5.0 Banners in the Prize Pool Editor
2024-08-29 09:54:14 +08:00
6e8c1d4a15 Update version to v1.16.0
Some checks are pending
Build project / build (push) Waiting to run
2024-08-28 23:05:54 +08:00
92f5289576 Update All resources to 5.0 2024-08-28 23:05:06 +08:00
剧毒的KCN
c62b46850c
Enable High DPI support (#231) 2024-06-23 22:34:03 +08:00
3d160f9b90 Update version to v1.15.2 2024-06-16 17:06:25 +08:00
79efb9bd51 Update some resources to 4.7 2024-06-16 17:06:25 +08:00
ef3c85c6d3 Fix Quest text 2024-06-09 12:20:06 +08:00
Jtuiii
e61fc45ad2
Update 4.7.0 Quest (#229) 2024-06-09 11:44:22 +08:00
de53f682f0 Add quick finish quest 2024-05-30 23:51:36 +08:00
3ddfa189e9 Update version to 1.15.1 2024-05-30 23:34:49 +08:00
ddc588c792 Update banners from https://github.com/Zhaokugua/Grasscutter_Banners 2024-05-30 23:33:49 +08:00
984afbdf0b Update banner titles to 4.6
Fix benner editor format
Add banner title update tool
2024-05-30 23:33:37 +08:00
56a72ad940 Rename banner resource files 2024-05-30 23:30:38 +08:00
b62c539bdd Update version to v1.15.0 2024-05-23 20:00:55 +08:00
d9272acb44 Update all resource to 4.6 2024-05-23 19:59:39 +08:00
5c89eb5a58 Update artifact set names 2024-03-31 15:49:42 +08:00
583041c295 Update version to v1.14.0 2024-03-25 00:15:04 +08:00
ded10d175f Update All Resources to 4.5.0 2024-03-25 00:14:30 +08:00
380682d175 Fix resource id 0 2024-03-24 23:33:59 +08:00
055bddc22c Fix proxy close issue 2024-03-24 23:33:59 +08:00
5b2442591f Fix include UID space issue 2023-11-12 13:54:49 +08:00
3eb1a08697 Fix #204 2023-10-30 23:35:10 +08:00
79283f4039 Optimize navigation framework 2023-10-21 09:42:00 +08:00
497b828f2d Fix clear button misalignment 2023-10-20 20:02:40 +08:00
41dc3e8fc4 Update weather translation(CHS) 2023-10-20 19:32:24 +08:00
eb1be4cdb8 Add reset all scene tag 2023-10-18 23:17:59 +08:00
d4655c1e50 Update change log 2023-10-18 23:07:12 +08:00
b1debe0aab Add clear button to command box 2023-10-18 23:03:25 +08:00
f5780a4366 Fix UI issues 2023-10-18 22:49:45 +08:00
101e3c5ffc Add clear button to all filter 2023-10-18 22:38:27 +08:00
97b3a57ee1 Add non aggressive AI option to spawn page 2023-10-18 22:19:08 +08:00
0788a32158 Fix command response new line 2023-10-18 22:05:51 +08:00
f553ddddd8 Add weather page translates 2023-10-18 22:05:29 +08:00
07fb477c3a Fix hotkey registration control 2023-10-14 15:55:57 +08:00
f8b920100d Add Weather Page 2023-10-14 11:36:17 +08:00
cfdca6f031 Fix nav error 2023-10-13 23:09:05 +08:00
085669e43a Add proxy page translation 2023-10-13 23:08:43 +08:00
eda70a2aae Add Settings page
Add Page tab order setting
Add Window opacity setting
2023-10-13 22:45:24 +08:00
c2be92c41b Fix hotkey registration issue 2023-10-08 12:23:13 +08:00
4bcd23389d Move stop proxy code 2023-10-08 00:09:25 +08:00
2a51fcb47d Add Proxy page 2023-10-08 00:01:20 +08:00
2c2f05c5b2 Add SceneTag Page 2023-10-07 22:22:35 +08:00
ab92469f11 Fix include uid bug 2023-10-07 21:24:59 +08:00
749f324f7d Add hotkey global switch 2023-09-29 15:04:30 +08:00
1c49c41b71 Update 4.1 resources(Avatar/Dungeon/Item/Weapon ) 2023-09-29 14:13:58 +08:00
1993d3d295 Fix include uid symbol issue 2023-09-24 00:27:55 +08:00
dce7e54675
Add HTTP(S) proxy (#208) 2023-09-23 10:48:24 +08:00
41c644f2af Add Run multiple commands at one time 2023-09-20 12:56:38 +08:00
78be273c7a Add dive prop 2023-08-29 00:12:01 +08:00
c94a7683e4 Update tab order 2023-08-25 19:53:40 +08:00
b407012bef Add FreezeTime and LockWeather to scene page 2023-08-25 19:47:23 +08:00
bb7d28153f Enlarge custom commands font size 2023-08-25 19:39:30 +08:00
627d9c7cd2 Add fly command 2023-08-25 19:37:14 +08:00
53a83fd7a7 Update version to v1.12.2 2023-08-24 19:51:49 +08:00
c2ca091662 Update Items filter 2023-08-24 19:51:30 +08:00
738a755353 Update All Gadgets
Update Spawn filter
2023-08-24 19:41:30 +08:00
dcbd946407 Fix console include @uid issue 2023-08-24 17:16:30 +08:00
2a8cebcbb5 Clean up all code 2023-08-24 15:18:12 +08:00
434ec7b2df Fix Jadefall's Splendor 2023-08-24 14:57:15 +08:00
c2ff37facf Update scene dungeon names 2023-08-24 13:49:15 +08:00
f48c9b4d0b Update 4.0 Quests 2023-08-24 00:02:19 +08:00
1d734479d1 Update filter button UI 2023-08-23 23:34:13 +08:00
a989581d59 Swap the run and copy button positions 2023-08-23 23:05:24 +08:00
6ab9d3842c Update version to v1.12.1 2023-08-23 22:40:42 +08:00
b69b2941b6 Fix auto check local server error 2023-08-23 22:39:40 +08:00
90deaa84b4 Update Scenes and avatar/weapon colors 2023-08-22 22:40:33 +08:00
403cc3fe52 Add GC 1.7 2023-08-22 22:24:01 +08:00
dd4eb36c17 Update Banners from https://github.com/Zhaokugua/Grasscutter_Banners 2023-08-22 22:23:08 +08:00
2645e16bee Add Resources update tool 2023-08-22 22:17:47 +08:00
82668c4c6a Update All 4.0 Ids 2023-08-22 22:17:18 +08:00
8fce4a8995 Update 4.0 Ids(Activity/Dungeon/Weapon) 2023-08-22 00:16:35 +08:00
Deuteriunt
4cfbebcc5a
Update Activity/Avatar/Weapon ids(CHS) (#202) 2023-08-20 14:57:40 +08:00
40db4236ba Add Commandline Usages 2023-08-02 18:06:43 +08:00
eef4687ed6 Clean up all code using CodeMaid 2023-08-02 17:43:01 +08:00
e9a3f4014e Remove debug code 2023-08-02 17:27:50 +08:00
749aae02ca Add GC v1.6.3 2023-08-02 17:26:14 +08:00
fc3fd10081 Add Server connection records (close #199) 2023-08-02 17:25:31 +08:00
65e664f35f Add shortcut keys Alt+[0~9] to switch pages (close #201) 2023-07-28 21:21:57 +08:00
ab9a617619 Allows setting individual key as HotKey 2023-07-25 21:17:02 +08:00
f629bc9993 Add HotKey Screenshot 2023-07-22 00:21:06 +08:00
dc7f48139e Update Command versions 2023-07-22 00:14:01 +08:00
da8c511d60 Update version to v1.11.0 2023-07-22 00:11:14 +08:00
eb60f402a4 Add Setting Upgrade 2023-07-22 00:11:01 +08:00
c82ce1ea35 Add HotKey Page (close #190) 2023-07-22 00:10:40 +08:00
9524ea5ab4 Update connection failure text (close #196) 2023-07-21 22:02:53 +08:00
caf18eaa7a Merge branch 'main' of https://github.com/jie65535/GrasscutterCommandGenerator 2023-07-21 21:41:20 +08:00
2cdcb4a599 Update spawn level maximum to 200 (close #198) 2023-07-21 21:41:00 +08:00
Deuteriunt
3407ca61fd
Update 3.8 Activity ID (#195)
* main

* Update WeaponColor.txt

* Update 3.8 Activity ID and untranslated sentences

* Remove redundant changes

* Update Weapon.txt

---------

Co-authored-by: jie65535 <jie65535@qq.com>
2023-07-07 23:40:56 +08:00
964b7ced8b
Merge pull request #194 from TomyJan/main
add new skins for custom command `All skins`
2023-06-28 21:02:20 +08:00
TomyJan
702267003b
add new skins for custom command All skins 2023-06-28 20:52:20 +08:00
abf970b783 Update host url check 2023-06-26 22:56:32 +08:00
6855b6299f Add Kot key utils from https://github.com/jie65535/KeyGo 2023-06-18 18:19:51 +08:00
b77d242bd9 Update version to v1.10.1 2023-06-18 18:02:49 +08:00
01016b1fa1 Fix tips 2023-06-18 18:02:39 +08:00
b2b656b6cb Support for command line arguments (#155) 2023-06-18 18:02:02 +08:00
aabe6664b4 Update Cutscene translates(CHT) 2023-06-10 11:28:19 +08:00
馬良※チノ
5869a72645
Cutscenes translation (#189)
* 200201

* i forgot xd

* 区分渊下宫与三界路飨祭

* 踏鞴砂

* 沙漠书 激活小塔柱子

* 3.6小活动(风沙轰鸣) 打沙虫动画

* 甘露池

* i forget x2 xd

* idk x3 lmao

* Update Cutscene.txt
2023-06-10 10:11:11 +08:00
df3ab12165 Update Activity editor screenshots 2023-06-09 23:59:47 +08:00
03fe8909d0 Update Activity Translates 2023-06-09 23:54:10 +08:00
2ec4bc9333 Remove unused dependencies 2023-06-09 23:07:48 +08:00
c1b89a2b9a Update Tools page 2023-06-09 22:42:33 +08:00
6706525e77 Update Dungeon resources 2023-06-09 22:42:11 +08:00
981b8377d8 Add /troubleshoot to custom commands 2023-06-09 21:52:00 +08:00
945329d109 Link https://github.com/Zhaokugua/Grasscutter_Banners 2023-06-09 21:47:06 +08:00
304f3484e3 Update 3.7.2 banners from https://github.com/Zhaokugua/Grasscutter_Banners 2023-06-09 21:38:24 +08:00
47ad6dae6a Update Cutscene screenshot 2023-06-09 21:35:42 +08:00
0448bb0ea9 Update Cutscene Translates 2023-06-09 21:35:16 +08:00
moux23333
5009d148a1
Cutscenes translation 3 (#188) 2023-06-09 14:00:15 +08:00
馬良※チノ
8427103a7e
Cutscenes translation 2 (#187)
* 116 117

* 75-86

* Update Cutscene.txt
2023-06-09 13:23:01 +08:00
2767cb44d7 Fix cutscene encoding 2023-06-09 00:18:57 +08:00
moux23333
416ffd6435
Cutscenes translation (#186)
* Cutscenes translation 1

* Cutscene translation 2
2023-06-08 23:52:41 +08:00
ff554ce369 Update PageScene localization 2023-06-08 22:52:27 +08:00
0698671c05 Update Cutscene.txt 2023-06-08 22:51:56 +08:00
67468cf28b Throw ping exception 2023-06-08 21:21:03 +08:00
058a6b7ab2 Update version to v1.10.0 2023-06-08 21:19:36 +08:00
1ccb3656c2 Add Cutscene command to Scene page 2023-06-08 21:19:26 +08:00
6da7e1d4d0 Fix Artifact MainAttribution changes without refreshing 2023-05-30 20:20:18 +08:00
119c8c87ee Remove temp file 2023-05-30 20:03:23 +08:00
2758b4d896 Update version to v1.9.1 2023-05-30 19:58:31 +08:00
d8c7f0ad56 Update 3.7 Resources 2023-05-30 19:58:00 +08:00
0d8b51f199
Update PageAbout.resx 2023-05-29 20:12:52 +08:00
6e296edf11
Update README.md 2023-05-29 20:08:18 +08:00
072066ac87
Update README_zh-tw.md 2023-05-29 20:08:08 +08:00
a359dea603
Update README_zh-cn.md 2023-05-29 20:07:56 +08:00
29decd4899
Update README.md 2023-05-29 20:06:44 +08:00
92a5d53d35 Update 3.7 first half banners from https://github.com/Zhaokugua/Grasscutter_Banners 2023-05-25 19:25:29 +08:00
40e33dcb1c Update All activity ids-3.7 from https://github.com/dplek/Genshin-Activity-ids 2023-05-25 19:23:00 +08:00
Deuteriunt
2b2757ccff
Add 3.7 Avatar and Weapon id (#182)
* main

* Update WeaponColor.txt

---------

Co-authored-by: jie65535 <jie65535@qq.com>
2023-05-25 12:39:44 +08:00
f57f4097ac Fix UI issue 2023-05-14 19:05:42 +08:00
5865441074 Fix activity id not set 2023-05-14 18:54:03 +08:00
2d916392c1 Fix CHS and CHT Achievement 2023-05-14 18:52:50 +08:00
dec3b2261f Fix Activity add issue 2023-05-14 18:52:25 +08:00
5b0cb912e4 Fix null ptr 2023-05-14 18:33:37 +08:00
5cbdaa7134 Add Activity Editor Translates 2023-05-14 15:33:31 +08:00
b2f59431a6 Update page title resource 2023-05-14 10:25:35 +08:00
04ec214714 Add SetProp Translates 2023-05-13 23:49:55 +08:00
196b56ab71 Add Set Prop Page 2023-05-13 21:57:57 +08:00
226742776f Add Activity Config Editor (CHS Only) 2023-05-08 22:53:40 +08:00
f4ec2ee5fa Update indexes 2023-05-08 00:02:51 +08:00
f33d37cd90 Add achievement page screenshots 2023-05-07 16:49:34 +08:00
2394ec7f5d Add achievement page translations 2023-05-07 16:43:47 +08:00
8baa61b72c Fix index offset error 2023-05-07 16:35:31 +08:00
f35ea79475 Add prompt to download from Action 2023-05-07 16:25:26 +08:00
46b8ca0b63 Add NavContainer splitter distance record
Fix not redrawing when Nav list size changed
2023-05-07 15:27:30 +08:00
b8cfaf308d Update page navigation
Add Achievement page
2023-05-07 14:55:50 +08:00
c7d3e5021c Update version to v1.9.0 2023-05-07 12:59:53 +08:00
a689b425ca Update RU translations from @EgorBron fork 2023-05-07 11:42:02 +08:00
9bd45157a4 Update 3.6 Resources 2023-05-07 11:36:10 +08:00
止语语哦~
169b8997ec
添加3.6角色、武器、一些物品 (#181) 2023-04-20 21:38:36 +08:00
Lefengisbee
aa6ea882d9
(For CHT) Added README_zh-tw.md 新增繁中Readme 檔案 Added Gadget.txt to zh-tw folder 新增Gadget.txt繁中版 (#180)
* CHS -> CHT, added Gadget.txt to zh-tw folder(from zh-cn folder)

* CHS -> CHT, added Gadget.txt to zh-tw folder(from zh-cn folder)

* Remove Gadget.txt

* added Gadget.txt to zh-tw folder(from zh-cn folder), added README_zh-tw.md

* Screenshot Improvement

* Modify md files, added CHT option

* Warning to CHT

* Revert "Warning to CHT"

This reverts commit 9459c7910a.
2023-03-16 23:07:11 +08:00
Lefengisbee
c86b275096
(For CHT) CHS strings to CHT遺漏簡中轉繁中 (#179)
* CHS -> CHT, added Gadget.txt to zh-tw folder(from zh-cn folder)

* CHS -> CHT, added Gadget.txt to zh-tw folder(from zh-cn folder)

* Remove Gadget.txt
2023-03-16 21:19:17 +08:00
moux23333
a81985549e
Full 3.5.0 Quest ids (#178) 2023-03-06 22:04:52 +08:00
ighlES
f4e9409afa
添加自定义指令 诚哥壶信任值升到10级 (#177)
* 添加自定义指令 诚哥壶信任值升到10级
2023-02-20 21:32:53 +08:00
6647e5bd37 Add OpenChat Ad 2023-02-18 16:27:22 +08:00
64b7c25de5 Update 3.4 Resources (Item/Monsters/Quest/Scene/Weapon) 2023-02-18 15:00:02 +08:00
7c562228c6 Update version to v1.8.1 2023-02-08 11:50:33 +08:00
91a194c948 Fix /drop command 2023-02-08 11:50:08 +08:00
50a30331e5 Fix /scene command 2023-02-08 11:49:33 +08:00
TomyJan
da47941564
(CHS Only)修改item分类名为中文&修改部分物品id排序&添加新的卡池id&增加两个自定义命令 (#175)
* 优化物品id&增加两个自定义命令

* del duplicate ids

* replenish gacha title/prefab to 3.4

* Update Item.txt
2023-01-31 18:22:26 +08:00
Syca
6e999f92a0 Add some ids(3.4.5) (CHS only) 2023-01-27 15:31:54 +08:00
f4fc0ef3c5 Fix the command is cleared after repeated 2023-01-12 14:22:40 +08:00
Syca
2dc8dc734b
Add 3.4beta Dungeon&Scene IDs(CHS only) (#172)
* Add 3.4beta DungeonIDs&SceneIDs(CHS only)

* Fix Scene Names(3.3)(CHS only)

* Update Scene.txt

* Fix Scene Names(3.2)(CHS only)

* Add files via upload
2022-12-26 21:01:55 +08:00
Syca
98663240de
Add Some 3.4beta IDs(CHS Only) (#169)
* add 3.4beta weapon

* Add Some 3.4bata items

* Add 3.4beta monsters
2022-12-17 21:49:48 +08:00
ba782c85d4 fix screenshots 2022-12-15 20:55:45 +08:00
dea067b21f Add task page screenshot 2022-12-15 20:43:51 +08:00
d56c73e2a3 Add Test page 2022-12-15 20:32:01 +08:00
5d208d1220 Update SceneIds and MonsterIds 2022-12-15 20:31:29 +08:00
47a3a1c7ab Add 3.3.50 avatar ids (from Sakura616 res)
Update quest text
2022-12-15 20:03:47 +08:00
56059b4f4f Update 3.3 Artifacts and avatar/weapon colors 2022-12-14 20:24:48 +08:00
09577d5403 Update Banners.json Ignore PreviewPrefabPath 2022-12-12 20:26:48 +08:00
fb77f9432a Add CI Badge 2022-12-10 23:56:12 +08:00
0f70405041
Update build.yml 2022-12-10 23:37:22 +08:00
399888f976 Update Task page translates 2022-12-10 18:14:54 +08:00
a8a0a14713 fix connect command issue 2022-12-10 17:57:51 +08:00
59af1e468d Add Task Page (#166) 2022-12-10 17:57:51 +08:00
0d1bad5551 Update version to v1.8.0 2022-12-10 17:57:50 +08:00
7eb2ff1624 Add categories to item page 2022-12-10 17:57:50 +08:00
72351ba60f Update 3.3 Resources (Items/Avatars/Weapons) 2022-12-10 17:57:50 +08:00
7dc2dcc9db
Update build.yml 2022-12-08 17:17:15 +08:00
5b4a7d784d
Create build.yml 2022-12-08 16:43:30 +08:00
1d8d199af7 Fix the problem that the next time it cannot be started when it is closed when it is minimized 2022-12-03 11:41:09 +08:00
c4e29dc000 Update version to v1.7.6 2022-12-03 11:32:53 +08:00
72ec031f8a Fix window location issue (#161) 2022-12-03 11:27:51 +08:00
2300b8d5db Add program log 2022-12-02 20:50:12 +08:00
7ec81ab146 Check the data directory only once 2022-12-01 19:50:05 +08:00
cf3ffeb8c6 Fix data file dir does not exist (#164) 2022-12-01 19:41:45 +08:00
118a7fe0f1 Update version to v1.7.5 2022-11-29 13:11:58 +08:00
005c68cc5b Optimize search(#149 #163) 2022-11-29 13:10:00 +08:00
70f390c5d7 Fix AttackModifier button event 2022-11-28 23:26:05 +08:00
65de82a227 Update Dungeon.txt(CHT) 2022-11-28 23:22:57 +08:00
a2494b59f7 Add empty file handling 2022-11-28 23:17:58 +08:00
b05269712a Add run log 2022-11-28 23:15:39 +08:00
740463f017 Remove FodyWeavers.xml 2022-11-28 23:08:14 +08:00
Syca
30521d068e Update 3.3beta dungeons
ehe
2022-11-28 13:27:46 +08:00
c7898401ce Clean up all
Remvoe TextBoxXP
2022-11-27 16:51:47 +08:00
d169de9a9e Update save settings only when main window is closed 2022-11-27 16:44:11 +08:00
74ddb428ee Hold include uid setting 2022-11-27 16:38:24 +08:00
ba4837f1f8 Update FileVersion to 1.7.4 2022-11-27 16:27:56 +08:00
cdf25f6b6f Fix import GOOD event 2022-11-27 16:26:53 +08:00
e630c53c9f Change the record files storage location 2022-11-27 16:25:28 +08:00
db13f82bfc Optimized restore window state 2022-11-27 16:15:57 +08:00
63ebaa5df8 Load pages 2022-11-27 16:08:19 +08:00
7b886ea251 Detach all pages of the main form 2022-11-27 15:29:56 +08:00
436c4d809c Separate pages 2022-11-26 23:47:46 +08:00
6ab7bac20b Add Dungeons(zh/en) 2022-11-26 10:23:40 +08:00
Egor Bron
7f852ffb8e
Ru translations fixes (#160)
* update GachaBennerPrefab and CustomCommands

* update ShopType (partially)

* update Drop, Shop and Main forms (partially)

* update READMEs

* fix link in Chinese README

* fix new mobs & functions (from 1.7.4)

* some fixes in ru translation and added gadgets to it

* update ru screenshots

Co-authored-by: 筱傑 <jie65535@qq.com>
2022-11-20 23:41:10 +08:00
69e68810ba Update items id 2022-11-20 16:17:13 +08:00
a63f79230b Update quest id (#157) 2022-11-20 16:10:13 +08:00
3b01c62ed2 Update new banners editor translates 2022-11-20 16:00:18 +08:00
cdc69d23b9 Update Command text box to ComboBox
Update ru translate
Update Modifier keys function
2022-11-20 15:43:05 +08:00
92a15afabf Impl hold shift run command (#151)
Impl main window input box accept enter (#150)
2022-11-20 15:08:45 +08:00
277e265bf1 Disable error prefab 2022-11-20 14:46:25 +08:00
473163e7c6 Update Banners Editor
Add Default Banners
2022-11-20 14:42:52 +08:00
f1eb40bb0d Fix tab order (#152) 2022-11-16 21:18:57 +08:00
6c23915615 Update version to v1.7.4 2022-11-16 21:03:03 +08:00
d0361c29aa Fix window size record 2022-11-16 21:02:43 +08:00
433 changed files with 250166 additions and 72341 deletions

32
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Build project
on:
push:
branches:
- main
paths:
- Source/**
pull_request:
branches:
- main
paths:
- Source/**
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1.3
- name: Build release
run: msbuild Source/GrasscutterTools.sln /p:Configuration=Release /t:build /restore
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: GrasscutterTools
path: Source/GrasscutterTools/bin/Release/GrasscutterTools.exe

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -3,19 +3,69 @@
[![GitHub license](https://img.shields.io/github/license/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/blob/main/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/stargazers)
[![Github All Releases](https://img.shields.io/github/downloads/jie65535/GrasscutterCommandGenerator/total.svg)](https://github.com/jie65535/GrasscutterCommandGenerator/releases)
[![QQ Group](https://pub.idqqimg.com/wpa/images/group.png)](https://qm.qq.com/cgi-bin/qm/qr?k=PdS9--b-n8LEAmYjX8fNFXtKDcsp4NHN&jump_from=webapi&authKey=7ty3ZCKYMKLGWLmO8O84qiNAZ0EuCnSGF+acP+74xuDMKYXXNjuPP7iUzffHz4r2)
[![GitHub release](https://img.shields.io/github/v/release/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/releases/latest)
[![Build](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml/badge.svg)](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml)
[![QQ Group](https://pub.idqqimg.com/wpa/images/group.png)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=fBizzp6RwJsIY7gFlmd4L-WG0V3aF8X3&authKey=mTjf%2B7jCIZess1HTRi05e5yi%2FHKA1auMwE8%2FJ960PFWk8WMATST654gWPi4OTHTZ&noverify=0&group_code=835489603)
English | [简体中文](README_zh-cn.md) | [Русский](README_ru-RU.md)
English | [简体中文](README_zh-cn.md) | [繁體中文](README_zh-tw.md) | [Русский](README_ru-RU.md)
## Commands Generator
Please download the latest version from [Releases](https://github.com/jie65535/GrasscutterCommandGenerator/releases)
Please download the latest committed automated build from [Action](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml), or a release from [Releases](https://github.com/jie65535/GrasscutterCommandGenerator/releases) (may be behind)
Support 简体中文, 繁中文, English and Русский languages.
Support 简体中文, 繁中文, English and Русский languages.
Welcome everyone to improve the [ID Resource](/Source/GrasscutterTools/Resources/en-us).
> **Warning**: app look may be different rather than on screenshots. It may also contain translation errors and a lack of certain resources. **We're welcome everyone to contribute to their [improvement](/Source/GrasscutterTools/Resources/en-us)**
## Remote command
The server require [gc-opencommand-plugin](https://github.com/jie65535/gc-opencommand-plugin) support
![OpenCommand](Doc/Screenshots/OpenCommand.gif)
> If you cannot connect to the server, please make sure the server address is correct.
>
> It is recommended to configure the server to HTTP mode, as shown in the figure(config.json):
> ![ConfigHttp](Doc/Screenshots/ConfigHttp.png)
>
> You can visit http://127.0.0.1/status/server with a browser to test whether the service is working properly.
>
> If you are not using port `80`, specify the port number to access in the url: http://127.0.0.1:443
## Update log
### GrasscutterTools-v1.13
![Proxy](Doc/Screenshots-en/22-Proxy.png)
![SceneTag](Doc/Screenshots-en/23-SceneTag.png)
![Weather](Doc/Screenshots-en/24-Weather.png)
![Settings](Doc/Screenshots-en/25-Settings.png)
### GrasscutterTools-v1.11
![HotKey](Doc/Screenshots-en/21-HotKey.png)
Commandline Usages:
```bash
GcTools.exe -help
GcTools.exe -version
GcTools.exe -c "cmd arg"
GcTools.exe -c "cmd1 arg" && GcTools -c "cmd2 arg1 arg2"
GcTools.exe -host http://127.0.0.1:443 -token 123456 -c "cmd1 arg1 arg2 | cmd2 | cmd3 arg"
```
### GrasscutterTools-v1.10
![Cutscene](Doc/Screenshots-en/7-ChangeScene.png)
![Activity Editor](Doc/Screenshots-en/20-ActivityEditor.png)
### GrasscutterTools-v1.9
![Achievement Page](Doc/Screenshots-en/19-AchievementPage.png)
### GrasscutterTools-v1.8
![Task page](Doc/Screenshots-en/18-TaskPage.png)
### GrasscutterTools-v1.7.3
![Gadget](Doc/Screenshots-en/6-SpawnEntity.png)
@ -37,21 +87,6 @@ Added [AttackModifier](https://github.com/NotThorny/AttackModifier), [AttackInfu
![Mail Editor](Doc/Screenshots-en/16-MailEditor.png)
## Remote command
The server require [gc-opencommand-plugin](https://github.com/jie65535/gc-opencommand-plugin) support
![OpenCommand](Doc/Screenshots/OpenCommand.gif)
> If you cannot connect to the server, please make sure the server address is correct.
>
> It is recommended to configure the server to HTTP mode, as shown in the figure(config.json):
> ![ConfigHttp](Doc/Screenshots/ConfigHttp.png)
>
> You can visit http://127.0.0.1/status/server with a browser to test whether the service is working properly.
>
> If you are not using port `80`, specify the port number to access in the url: http://127.0.0.1:443
---

View File

@ -3,39 +3,18 @@
[![GitHub лицензия](https://img.shields.io/github/license/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/blob/main/LICENSE)
[![GitHub звёзды](https://img.shields.io/github/stars/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/stargazers)
[![Github ВСЕ выпуски](https://img.shields.io/github/downloads/jie65535/GrasscutterCommandGenerator/total.svg)](https://github.com/jie65535/GrasscutterCommandGenerator/releases)
[![GitHub release](https://img.shields.io/github/v/release/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/releases/latest)
[![Build](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml/badge.svg)](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml)
[English](README.md) | [简体中文](README_zh-cn.md) | Русский - Перевод [Юрий Дворецкий](https://github.com/yurikenjx) (с исправлениями от [EgorBron](https://github.com/EgorBron))
[English](README.md) | [简体中文](README_zh-cn.md) | [繁體中文](README_zh-tw.md) | Русский - Перевод [Юрий Дворецкий](https://github.com/yurikenjx) (с исправлениями от [EgorBron](https://github.com/EgorBron))
## Генератор команд (GCG)
Загрузите последнюю версию из вкладки [Releases](https://github.com/jie65535/GrasscutterCommandGenerator/releases).
Пожалуйста, загрузите последнюю подтвержденную автоматизированную сборку из [Action](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml) или выпуск из [Releases](https://github.com/jie65535/GrasscutterCommandGenerator/releases) (может отставать)
GCG поддерживает 简体中文 (китайский упр.), 繁中文 (китайский трад.), English (английский) и Русский языки.
GCG поддерживает 简体中文 (китайский упр.), 繁中文 (китайский трад.), English (английский) и Русский языки.
Приглашаем всех улучшить [ID ресурсов и перевод](/Source/GrasscutterTools/Resources/ru-ru)
## Update log
### GrasscutterTools-v1.7.3
![Gadget](Doc/Screenshots-ru/4-SpawnEntity.png)
Added [AttackModifier](https://github.com/NotThorny/AttackModifier), [AttackInfusedWithItem](https://github.com/snoobi-seggs/AttackInfusedWithItem), [SwitchElementTraveller](https://github.com/Penelopeep/SwitchElementTraveller) plugins command generation
![AttackInfusedWithItem Gif](Doc/Screenshots/AttackMod.gif)
### GrasscutterTools-v1.7.2
![Shop Editor](Doc/Screenshots-ru/17-ShopEditor.png)
### GrasscutterTools-v1.7.1
- Gadgets (CHS Only)
### GrasscutterTools-v1.7.0
![Run Commands](Doc/Screenshots/RunMultipleCommands.png)
![Drop Editor](Doc/Screenshots-ru/15-DropEditor.png)
![Mail Editor](Doc/Screenshots-ru/16-MailEditor.png)
> **Warning**: вид приложения может отличаться от скриншотов. Также в нём могут присутствовать ошибки в переводе и отсутсвие некоторых ресурсов. **Мы приглашаем всех сделать вклад в их [улучшение](/Source/GrasscutterTools/Resources/ru-ru)**
## Удаленная команда (OpenCommand)
@ -53,34 +32,96 @@ Added [AttackModifier](https://github.com/NotThorny/AttackModifier), [AttackInfu
>
> Если вы не указали порт `80` в конфиге, вам нужно указать свой порт в URL-адресе (например, http://127.0.0.1:443)
## Лог обновлений
### GrasscutterTools-v1.13
![Proxy](Doc/Screenshots-en/22-Proxy.png)
![SceneTag](Doc/Screenshots-en/23-SceneTag.png)
![Weather](Doc/Screenshots-en/24-Weather.png)
![Settings](Doc/Screenshots-en/25-Settings.png)
### GrasscutterTools-v1.11
![HotKey](Doc/Screenshots-en/21-HotKey.png)
Commandline Usages:
```bash
GcTools.exe -help
GcTools.exe -version
GcTools.exe -c "cmd arg"
GcTools.exe -c "cmd1 arg" && GcTools -c "cmd2 arg1 arg2"
GcTools.exe -host http://127.0.0.1:443 -token 123456 -c "cmd1 arg1 arg2 | cmd2 | cmd3 arg"
```
### GrasscutterTools-v1.10
![Cutscene](Doc/Screenshots-ru/12-Scenes.png)
![Activity Editor](Doc/Screenshots-ru/20-ActivityEditor.png)
### GrasscutterTools-v1.9
![Achievement Page](Doc/Screenshots-ru/19-AchievementPage.png)
### GrasscutterTools-v1.8
![Task page](Doc/Screenshots-ru/18-TaskPage.png)
### GrasscutterTools-v1.7.3
![Улучшенный спавн](Doc/Screenshots-ru/5-Spawn.png)
Добавлена поддержка генерации команд для плагинов [AttackModifier](https://github.com/NotThorny/AttackModifier), [AttackInfusedWithItem](https://github.com/snoobi-seggs/AttackInfusedWithItem), [SwitchElementTraveller](https://github.com/Penelopeep/SwitchElementTraveller).
![AttackInfusedWithItem Gif](Doc/Screenshots/AttackMod.gif)
### GrasscutterTools-v1.7.2
![Редактор магазина](Doc/Screenshots-ru/13-Shop.png)
### GrasscutterTools-v1.7.1
- Гаджеты (пока что только на китайском)
### GrasscutterTools-v1.7.0
![Запуск нескольких команд](Doc/Screenshots/RunMultipleCommands.png)
![Редактор дропа](Doc/Screenshots-ru/15-Drops.png)
![Редактор писем](Doc/Screenshots-ru/10-Mail.png)
---
## Скриншоты
![Логитип](Doc/Screenshots/GrasscutterLogo.png)
![Главная](Doc/Screenshots-ru/0-Home.png)
![Главная](Doc/Screenshots-ru/1-Home.png)
![Скриншот пользовательских команд](Doc/Screenshots-ru/1-CustomCommands.png)
![OpenCommand](Doc/Screenshots-ru/2-Opencommand.png)
![Скриншот артефактов](Doc/Screenshots-ru/2-CustomArtifact.png)
![Кастомные команды](Doc/Screenshots-ru/3-Custom.png)
![Скриншот квестов](Doc/Screenshots-ru/3-Quest.png)
![Артефакты](Doc/Screenshots-ru/4-Artifacts.png)
![Скриншот спавна сущностей](Doc/Screenshots-ru/4-SpawnEntity.png)
![Спавн сущностей](Doc/Screenshots-ru/5-Spawn.png)
![Скриншот выдачи персонажа](Doc/Screenshots-ru/5-GiveAvatar.png)
![Выдача предметов](Doc/Screenshots-ru/6-Give.png)
![Скриншот выдачи оружия](Doc/Screenshots-ru/7-CustomWeapon.png)
![Выдача персонажей](Doc/Screenshots-ru/7-Character.png)
![Скриншот выдачи предметов](Doc/Screenshots-ru/8-GiveItem.png)
![Выдача оружий](Doc/Screenshots-ru/8-Weapons.png)
![Скриншот смены сцены](Doc/Screenshots-ru/9-ChangeScene.png)
![Управление аккаунтами](Doc/Screenshots-ru/9-Accounts.png)
![Скриншот управления аккаунтом](Doc/Screenshots-ru/11-Manage.png)
![Почта](Doc/Screenshots-ru/10-Mail.png)
![Скриншот OpenCommand](Doc/Screenshots-ru/13-Remote.png)
![Квесты](Doc/Screenshots-ru/11-Quests.png)
![Редактор баннеров](Doc/Screenshots-ru/14-GachaBannerEditor.png)
![Сцены](Doc/Screenshots-ru/12-Scenes.png)
![Текстоый браузер карт](Doc/Screenshots-ru/15-TextMapBrowser.png)
![Редактор магазина](Doc/Screenshots-ru/13-Shop.png)
![Редактор баннеров](Doc/Screenshots-ru/14-Gachas.png)
![Редактор дропа](Doc/Screenshots-ru/14-Drops.png)
![Браузер текстов](Doc/Screenshots-ru/16-Textmaps.png)

View File

@ -3,19 +3,69 @@
[![GitHub license](https://img.shields.io/github/license/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/blob/main/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/stargazers)
[![Github All Releases](https://img.shields.io/github/downloads/jie65535/GrasscutterCommandGenerator/total.svg)](https://github.com/jie65535/GrasscutterCommandGenerator/releases)
[![QQ Group](https://pub.idqqimg.com/wpa/images/group.png)](https://qm.qq.com/cgi-bin/qm/qr?k=PdS9--b-n8LEAmYjX8fNFXtKDcsp4NHN&jump_from=webapi&authKey=7ty3ZCKYMKLGWLmO8O84qiNAZ0EuCnSGF+acP+74xuDMKYXXNjuPP7iUzffHz4r2)
[![GitHub release](https://img.shields.io/github/v/release/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/releases/latest)
[![Build](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml/badge.svg)](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml)
[![QQ Group](https://pub.idqqimg.com/wpa/images/group.png)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=fBizzp6RwJsIY7gFlmd4L-WG0V3aF8X3&authKey=mTjf%2B7jCIZess1HTRi05e5yi%2FHKA1auMwE8%2FJ960PFWk8WMATST654gWPi4OTHTZ&noverify=0&group_code=835489603)
[English](README.md) | 简体中文 | [Русский](README_ru-RU.md)
[English](README.md) | 简体中文 | [繁體中文](README_zh-tw.md) | [Русский](README_ru-RU.md)
## Commands Generator
请从 [Releases](https://github.com/jie65535/GrasscutterCommandGenerator/releases) 中获取最新版本
请从 [Action](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml) 中下载最新提交的自动构建版本,或者从 [Releases](https://github.com/jie65535/GrasscutterCommandGenerator/releases) 中下载发布版本(可能落后)
本工具支持 简体中文, 繁中文, English 与 Русский 语言。
本工具支持 简体中文, 繁中文, English 与 Русский 语言。
欢迎大家一起来完善工具的[内置资源](/Source/GrasscutterTools/Resources/zh-cn)。
> **Warning**: 应用程序的外观可能与截图上的不同。它也可能包含翻译错误和缺乏某些资源。**我们欢迎各位为此工具做出贡献并<a href="./Source/GrasscutterTools/Resources/zh-cn">改进</a> : )**
## Update log
## 远程执行
服务端需要 [gc-opencommand-plugin](https://github.com/jie65535/gc-opencommand-plugin) 插件支持
![OpenCommand](Doc/Screenshots/OpenCommand.gif)
> 如果你无法连接到服务器,请确认填写的服务器地址是否正确。
>
> 建议配置服务器为HTTP模式如图所示(config.json)
> ![ConfigHttp](Doc/Screenshots/ConfigHttp.png)
>
> 你可以用浏览器访问 http://127.0.0.1/status/server 来测试服务是否正常工作。
>
> 如果使用的不是`80`端口则要在url中指定访问的端口号http://127.0.0.1:443
## 更新概要
### GrasscutterTools-v1.13
![Proxy](Doc/Screenshots/22-Proxy.png)
![SceneTag](Doc/Screenshots/23-SceneTag.png)
![Weather](Doc/Screenshots/24-Weather.png)
![Settings](Doc/Screenshots/25-Settings.png)
### GrasscutterTools-v1.11
![HotKey](Doc/Screenshots/21-HotKey.png)
命令行用法:
```bash
GcTools.exe -help
GcTools.exe -version
GcTools.exe -c "cmd arg"
GcTools.exe -c "cmd1 arg" && GcTools -c "cmd2 arg1 arg2"
GcTools.exe -host http://127.0.0.1:443 -token 123456 -c "cmd1 arg1 arg2 | cmd2 | cmd3 arg"
```
### GrasscutterTools-v1.10
![Cutscene](Doc/Screenshots/7-ChangeScene.png)
![Activity Editor](Doc/Screenshots/20-ActivityEditor.png)
### GrasscutterTools-v1.9
![Achievement Page](Doc/Screenshots/19-AchievementPage.png)
### GrasscutterTools-v1.8
![Task page](Doc/Screenshots/18-TaskPage.png)
### GrasscutterTools-v1.7.3
![Spawns](Doc/Screenshots/6-SpawnEntity.png)
@ -42,21 +92,6 @@
![Mail Editor](Doc/Screenshots/16-MailEditor.png)
## 远程执行
服务端需要 [gc-opencommand-plugin](https://github.com/jie65535/gc-opencommand-plugin) 插件支持
![OpenCommand](Doc/Screenshots/OpenCommand.gif)
> 如果你无法连接到服务器,请确认填写的服务器地址是否正确。
>
> 建议配置服务器为HTTP模式如图所示(config.json)
> ![ConfigHttp](Doc/Screenshots/ConfigHttp.png)
>
> 你可以用浏览器访问 http://127.0.0.1/status/server 来测试服务是否正常工作。
>
> 如果使用的不是`80`端口则要在url中指定访问的端口号http://127.0.0.1:443
---
## 软件截图

125
README_zh-tw.md Normal file
View File

@ -0,0 +1,125 @@
# Grasscutter Tools
[![GitHub license](https://img.shields.io/github/license/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/blob/main/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/stargazers)
[![Github All Releases](https://img.shields.io/github/downloads/jie65535/GrasscutterCommandGenerator/total.svg)](https://github.com/jie65535/GrasscutterCommandGenerator/releases)
[![GitHub release](https://img.shields.io/github/v/release/jie65535/GrasscutterCommandGenerator)](https://github.com/jie65535/GrasscutterCommandGenerator/releases/latest)
[![Build](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml/badge.svg)](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml)
[![QQ Group](https://pub.idqqimg.com/wpa/images/group.png)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=fBizzp6RwJsIY7gFlmd4L-WG0V3aF8X3&authKey=mTjf%2B7jCIZess1HTRi05e5yi%2FHKA1auMwE8%2FJ960PFWk8WMATST654gWPi4OTHTZ&noverify=0&group_code=835489603)
[English](README.md) | [简体中文](README_zh-cn.md) | 繁體中文 | [Русский](README_ru-RU.md)
## 指令產生工具
請從 [Action](https://github.com/jie65535/GrasscutterCommandGenerator/actions/workflows/build.yml) 中下載最新提交的自動構建版本,或者從 [Releases](https://github.com/jie65535/GrasscutterCommandGenerator/releases) 中下載發布版本(可能落後)
本工具支援 简体中文、繁體中文、English 及 Русский 上述語言。
> **Warning**: 程式中的實際外觀可能會與截圖中的內容不同。其中也可能包含翻譯錯誤及缺乏特定資源。**我們歡迎各位為此工具做出貢獻並[改進](/Source/GrasscutterTools/Resources/zh-tw)**
## 遠端控制
伺服器需要安裝 [gc-opencommand-plugin](https://github.com/jie65535/gc-opencommand-plugin) 插件
![OpenCommand](Doc/Screenshots-tw/OpenCommand.gif)
> 如果你無法連接至伺服器,請確認輸入的伺服器位址是否正確。
>
> 建議將伺服器調整為HTTP模式如下圖所示(config.json):
> ![ConfigHttp](Doc/Screenshots-tw/ConfigHttp.png)
>
> 你可藉由任何瀏覽器輸入網址 http://127.0.0.1/status/server 以測試伺服器是否正常運作。
>
> 如果你並非使用`80`端口, 則須在網址後輸入指定端口: http://127.0.0.1:443
## 更新日誌
### GrasscutterTools-v1.13
![Proxy](Doc/Screenshots/22-Proxy.png)
![SceneTag](Doc/Screenshots/23-SceneTag.png)
![Weather](Doc/Screenshots/24-Weather.png)
![Settings](Doc/Screenshots/25-Settings.png)
### GrasscutterTools-v1.11
![HotKey](Doc/Screenshots/21-HotKey.png)
Commandline Usages:
```bash
GcTools.exe -help
GcTools.exe -version
GcTools.exe -c "cmd arg"
GcTools.exe -c "cmd1 arg" && GcTools -c "cmd2 arg1 arg2"
GcTools.exe -host http://127.0.0.1:443 -token 123456 -c "cmd1 arg1 arg2 | cmd2 | cmd3 arg"
```
### GrasscutterTools-v1.10
![Cutscene](Doc/Screenshots-tw/7-ChangeScene.png)
![Activity Editor](Doc/Screenshots-tw/20-ActivityEditor.png)
### GrasscutterTools-v1.9
![Achievement Page](Doc/Screenshots-tw/19-AchievementPage.png)
### GrasscutterTools-v1.8
![Task page](Doc/Screenshots-tw/18-TaskPage.png)
### GrasscutterTools-v1.7.3
![Spawns](Doc/Screenshots-tw/6-SpawnEntity.png)
![AttackMod](Doc/Screenshots-tw/6.1-AttackMod.png)
![AttackInfuse](Doc/Screenshots-tw/6.2-AttackInfuse.png)
新增 [攻擊修改](https://github.com/NotThorny/AttackModifier)、[攻擊注入](https://github.com/snoobi-seggs/AttackInfusedWithItem)、[主角切換元素](https://github.com/Penelopeep/SwitchElementTraveller)等插件指令產生
![AttackInfusedWithItem Gif](Doc/Screenshots-tw/AttackMod.gif)
### GrasscutterTools-v1.7.2
![Shop Editor](Doc/Screenshots-tw/17-ShopEditor.png)
### GrasscutterTools-v1.7.1
- 新增 Gadgets
### GrasscutterTools-v1.7.0
![Run Commands](Doc/Screenshots-tw/RunMultipleCommands.png)
![Drop Editor](Doc/Screenshots-tw/15-DropEditor.png)
![Mail Editor](Doc/Screenshots-tw/16-MailEditor.png)
---
## 工具截圖
![Logo](Doc/Screenshots-tw/GrasscutterLogo.png)
![Home](Doc/Screenshots-tw/0-Home.png)
![Custom Commands Screenshot](Doc/Screenshots-tw/1-CustomCommands.png)
![Custom Artifact Screenshot](Doc/Screenshots-tw/2-CustomArtifact.png)
![Custom Weapon Screenshort](Doc/Screenshots-tw/3-CustomWeapon.png)
![Give Item Screenshort](Doc/Screenshots-tw/4-GiveItem.png)
![Give Avatar Screenshort](Doc/Screenshots-tw/5-GiveAvatar.png)
![Spawn Entity Screenshort](Doc/Screenshots-tw/6-SpawnEntity.png)
![Change Scene Screenshort](Doc/Screenshots-tw/7-ChangeScene.png)
![Management](Doc/Screenshots-tw/9-Manage.png)
![GachaBannerEditor](Doc/Screenshots-tw/10-GachaBannerEditor.png)
![Text Map Browser](Doc/Screenshots-tw/11-TextMapBrowser.png)
![Remote Screenshort](Doc/Screenshots-tw/12-Remote.png)
![Quest Screenshort](Doc/Screenshots-tw/13-Quest.png)

View File

@ -29,7 +29,7 @@
<value>10001</value>
</setting>
<setting name="Host" serializeAs="String">
<value>https://127.0.0.1</value>
<value>http://127.0.0.1:443</value>
</setting>
<setting name="CheckedLastVersion" serializeAs="String">
<value />
@ -58,6 +58,33 @@
<setting name="MainFormSize" serializeAs="String">
<value>0, 0</value>
</setting>
<setting name="BannersJsonPath" serializeAs="String">
<value />
</setting>
<setting name="IsIncludeUID" serializeAs="String">
<value>False</value>
</setting>
<setting name="NavContainerSplitterDistance" serializeAs="String">
<value>0</value>
</setting>
<setting name="ActivityConfigJsonPath" serializeAs="String">
<value />
</setting>
<setting name="ProjectResourcePath" serializeAs="String">
<value />
</setting>
<setting name="IsUpgraded" serializeAs="String">
<value>False</value>
</setting>
<setting name="IsHotkeyEenabled" serializeAs="String">
<value>True</value>
</setting>
<setting name="AutoStartProxy" serializeAs="String">
<value>False</value>
</setting>
<setting name="WindowOpacity" serializeAs="String">
<value>100</value>
</setting>
</GrasscutterTools.Properties.Settings>
</userSettings>
</configuration>

View File

@ -1,186 +0,0 @@
using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace GrasscutterTools.Controls
{
[ToolboxItem(true)]
public class TextBoxXP : TextBox
{
/// <summary>
/// 获得当前进程,以便重绘控件
/// </summary>
/// <param name="hWnd"></param>
/// <returns></returns>
[DllImport("user32.dll")]
private static extern IntPtr GetWindowDC(IntPtr hWnd);
[DllImport("user32.dll")]
private static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
private const int EM_SETCUEBANNER = 0x1501;
[DllImport("user32.dll", CharSet = CharSet.Auto)]
private static extern Int32 SendMessage
(IntPtr hWnd, int msg, int wParam, [MarshalAs(UnmanagedType.LPWStr)] string lParam);
/// <summary>
/// 水印文本
/// </summary>
private string _Watermark = "";
private float maximum;
private float minimum;
#region
/// <summary>
/// 是否启用热点效果
/// </summary>
[Category("外观")]
[Browsable(true)]
[Localizable(true)]
[Description("获取或设置输入框水印文本")]
[DefaultValue("")]
public string Watermark
{
get
{
return this._Watermark;
}
set
{
this._Watermark = value;
SendMessage(Handle, EM_SETCUEBANNER, 0, _Watermark);
this.Invalidate();
}
}
/// <summary>
/// 是否只能输入数字
/// </summary>
[Category("行为")]
[Browsable(true)]
[Description("获取或设置TextBox是否只允许输入数字")]
[DefaultValue(false)]
public bool DigitOnly { get; set; }
/// <summary>
/// 转为数值
/// </summary>
public float Number
{
get
{
if (float.TryParse(Text, out float value))
return value;
else
return 0f;
}
}
[Category("数据")]
[Browsable(true)]
[DefaultValue(0)]
[Description("指示小数点后位数")]
public int DecimalPlaces { get; set; }
[Category("数据")]
[Description("获取或设置限制的最大值")]
public float Maximum
{
get
{
return maximum;
}
set
{
maximum = value;
if (minimum > maximum)
{
minimum = maximum;
}
}
}
[Category("数据")]
[Browsable(true)]
[Description("获取或设置限制的最小值")]
public float Minimum
{
get
{
return minimum;
}
set
{
minimum = value;
if (minimum > maximum)
{
maximum = value;
}
}
}
#endregion
/// <summary>
///
/// </summary>
public TextBoxXP()
: base()
{
//BorderStyle = BorderStyle.FixedSingle;
//Font = Styles.StaticResources.DefaultFont;
}
protected override void OnKeyPress(KeyPressEventArgs e)
{
base.OnKeyPress(e);
// 如果只允许输入数字,则判断输入是否为退格或者数字
if (DigitOnly)
{
//IsNumber指定字符串中位于指定位置的字符是否属于数字类别
//IsPunctuation指定字符串中位于指定位置的字符是否属于标点符号类别
//IsControl指定字符串中位于指定位置的字符是否属于控制字符类别
if (!Char.IsNumber(e.KeyChar) && !Char.IsPunctuation(e.KeyChar) && !Char.IsControl(e.KeyChar))
{
e.Handled = true; //获取或设置一个值指示是否处理过System.Windows.Forms.Control.KeyPress事件
}
else if (Char.IsPunctuation(e.KeyChar) && DecimalPlaces > 0)
{
if (e.KeyChar == '.')
{
if (Text.LastIndexOf('.') != -1)
{
e.Handled = true;
}
}
else
{
e.Handled = true;
}
}
}
}
protected override void OnLeave(EventArgs e)
{
base.OnLeave(e);
if (DigitOnly)
{
if (!string.IsNullOrWhiteSpace(Text))
{
if (Number > Maximum)
Text = Maximum.ToString("F" + DecimalPlaces);
if (Number < Minimum)
Text = Minimum.ToString("F" + DecimalPlaces);
}
}
}
}
}

View File

@ -14,8 +14,9 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*
**/
using System.Threading.Tasks;
using GrasscutterTools.DispatchServer.Model;
@ -23,7 +24,7 @@ using GrasscutterTools.Utils;
namespace GrasscutterTools.DispatchServer
{
public static class DispatchServerAPI
internal static class DispatchServerAPI
{
public static async Task<ServerStatus> QueryServerStatus(string host)
{

View File

@ -14,13 +14,14 @@
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*
**/
using Newtonsoft.Json;
namespace GrasscutterTools.DispatchServer.Model
{
public class ServerStatus
internal class ServerStatus
{
[JsonProperty("playerCount")]
public int PlayerCount { get; set; }
@ -32,7 +33,7 @@ namespace GrasscutterTools.DispatchServer.Model
public string Version { get; set; }
}
public class ServerStatusResponse
internal class ServerStatusResponse
{
[JsonProperty("retcode")]
public int RetCode { get; set; }

View File

@ -0,0 +1,202 @@
#nullable enable
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
namespace Eavesdrop;
public sealed class Certifier : IDisposable
{
private readonly X509Store _rootStore, _myStore;
private readonly IDictionary<string, X509Certificate2> _certificateCache;
public string Issuer { get; }
public string CertificateAuthorityName { get; }
public DateTime NotAfter { get; set; }
public DateTime NotBefore { get; set; }
public int KeyLength { get; set; } = 1024;
public bool IsCachingSignedCertificates { get; set; }
public X509Certificate2? Authority { get; private set; }
public Certifier()
: this("Eavesdrop")
{ }
public Certifier(string issuer)
: this(issuer, $"{issuer} Root Certificate Authority", StoreLocation.CurrentUser)
{ }
public Certifier(string issuer, string certificateAuthorityName)
: this(issuer, certificateAuthorityName, StoreLocation.CurrentUser)
{ }
public Certifier(string issuer, string certificateAuthorityName, StoreLocation location)
{
_myStore = new X509Store(StoreName.My, location);
_rootStore = new X509Store(StoreName.Root, location);
_certificateCache = new Dictionary<string, X509Certificate2>();
NotBefore = DateTime.Now;
NotAfter = NotBefore.AddMonths(1);
Issuer = issuer;
CertificateAuthorityName = certificateAuthorityName;
}
public bool CreateTrustedRootCertificate()
{
return (Authority = InstallCertificate(_rootStore, CertificateAuthorityName)) != null;
}
public bool DestroyTrustedRootCertificate()
{
return DestroyCertificates(_rootStore);
}
public bool ExportTrustedRootCertificate(string path)
{
X509Certificate2? rootCertificate = InstallCertificate(_rootStore, CertificateAuthorityName);
path = Path.GetFullPath(path);
if (rootCertificate != null)
{
byte[] data = rootCertificate.Export(X509ContentType.Cert);
File.WriteAllBytes(path, data);
}
return File.Exists(path);
}
public X509Certificate2? GenerateCertificate(string certificateName)
{
return InstallCertificate(_myStore, certificateName);
}
public X509Certificate2 CreateCertificate(string subjectName, string alternateName)
{
using var rsa = RSA.Create(KeyLength);
var certificateRequest = new CertificateRequest(subjectName, rsa, HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1);
if (Authority == null)
{
certificateRequest.CertificateExtensions.Add(new X509BasicConstraintsExtension(true, false, 0, true));
certificateRequest.CertificateExtensions.Add(new X509SubjectKeyIdentifierExtension(certificateRequest.PublicKey, false));
using X509Certificate2 certificate = certificateRequest.CreateSelfSigned(NotBefore.ToUniversalTime(), NotAfter.ToUniversalTime());
certificate.FriendlyName = alternateName;
return new X509Certificate2(certificate.Export(X509ContentType.Pfx, string.Empty), string.Empty, X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
}
else
{
var sanBuilder = new SubjectAlternativeNameBuilder();
sanBuilder.AddDnsName(alternateName);
certificateRequest.CertificateExtensions.Add(sanBuilder.Build());
certificateRequest.CertificateExtensions.Add(new X509BasicConstraintsExtension(false, false, 0, false));
certificateRequest.CertificateExtensions.Add(new X509SubjectKeyIdentifierExtension(certificateRequest.PublicKey, false));
using X509Certificate2 certificate = certificateRequest.Create(Authority, Authority.NotBefore, Authority.NotAfter, Guid.NewGuid().ToByteArray());
using X509Certificate2 certificateWithPrivateKey = certificate.CopyWithPrivateKey(rsa);
certificateWithPrivateKey.FriendlyName = alternateName;
return new X509Certificate2(certificateWithPrivateKey.Export(X509ContentType.Pfx, string.Empty), string.Empty, X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
}
}
private X509Certificate2? InstallCertificate(X509Store store, string certificateName)
{
if (_certificateCache.TryGetValue(certificateName, out X509Certificate2? certificate))
{
if (DateTime.Now >= certificate.NotAfter)
{
_certificateCache.Remove(certificateName);
}
else return certificate;
}
lock (store)
{
try
{
store.Open(OpenFlags.ReadWrite);
string subjectName = $"CN={certificateName}, O={Issuer}";
certificate = FindCertificates(store, subjectName)?[0];
if (certificate != null && DateTime.Now >= certificate.NotAfter)
{
if (Authority == null)
{
DestroyCertificates();
store.Open(OpenFlags.ReadWrite);
}
else
{
store.Remove(certificate);
}
certificate = null;
}
if (certificate == null)
{
certificate = CreateCertificate(subjectName, certificateName);
if (certificate != null)
{
if (store == _rootStore || IsCachingSignedCertificates)
{
store.Add(certificate);
}
}
}
return certificate;
}
catch { return certificate = null; }
finally
{
store.Close();
if (certificate != null && !_certificateCache.ContainsKey(certificateName))
{
_certificateCache.Add(certificateName, certificate);
}
}
}
}
public bool DestroyCertificates(X509Store store)
{
lock (store)
{
try
{
store.Open(OpenFlags.ReadWrite);
X509Certificate2Collection certificates = store.Certificates.Find(X509FindType.FindByIssuerName, Issuer, false);
store.RemoveRange(certificates);
IEnumerable<string> subjectNames = certificates.Cast<X509Certificate2>().Select(c => c.GetNameInfo(X509NameType.SimpleName, false));
foreach (string subjectName in subjectNames)
{
if (!_certificateCache.ContainsKey(subjectName)) continue;
_certificateCache.Remove(subjectName);
}
return true;
}
catch { return false; }
finally { store.Close(); }
}
}
public bool DestroyCertificates() => DestroyCertificates(_myStore) && DestroyCertificates(_rootStore);
private static X509Certificate2Collection? FindCertificates(X509Store store, string subjectName)
{
X509Certificate2Collection certificates = store.Certificates
.Find(X509FindType.FindBySubjectDistinguishedName, subjectName, false);
return certificates.Count > 0 ? certificates : null;
}
public void Dispose()
{
_myStore.Close();
_rootStore.Close();
_myStore.Dispose();
_rootStore.Dispose();
}
}

View File

@ -0,0 +1,200 @@
using System;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Threading.Tasks;
using System.Collections.Generic;
using Eavesdrop.Network;
namespace Eavesdrop
{
public static class Eavesdropper
{
private static TcpListener _listener;
private static readonly object _stateLock;
public delegate Task AsyncEventHandler<TEventArgs>(object sender, TEventArgs e);
public static event AsyncEventHandler<RequestInterceptedEventArgs> RequestInterceptedAsync;
private static async Task OnRequestInterceptedAsync(RequestInterceptedEventArgs e)
{
Task interceptedTask = RequestInterceptedAsync?.Invoke(null, e);
if (interceptedTask != null)
{
await interceptedTask;
}
}
public static event AsyncEventHandler<ResponseInterceptedEventArgs> ResponseInterceptedAsync;
private static async Task OnResponseInterceptedAsync(ResponseInterceptedEventArgs e)
{
Task interceptedTask = ResponseInterceptedAsync?.Invoke(null, e);
if (interceptedTask != null)
{
await interceptedTask;
}
}
public static List<string> Overrides { get; }
public static bool IsRunning { get; private set; }
public static Certifier Certifier { get; set; }
static Eavesdropper()
{
_stateLock = new object();
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
Overrides = new List<string>();
Certifier = new Certifier("Eavesdrop", "Eavesdrop Root Certificate Authority");
}
public static void Terminate()
{
lock (_stateLock)
{
ResetMachineProxy();
IsRunning = false;
if (_listener != null)
{
_listener.Stop();
_listener = null;
}
}
}
public static void Initiate(int port)
{
Initiate(port, Interceptors.Default);
}
public static void Initiate(int port, Interceptors interceptors)
{
Initiate(port, interceptors, true);
}
public static void Initiate(int port, Interceptors interceptors, bool setSystemProxy)
{
lock (_stateLock)
{
Terminate();
_listener = new TcpListener(IPAddress.Any, port);
_listener.Start();
IsRunning = true;
Task.Factory.StartNew(InterceptRequestAsync, TaskCreationOptions.LongRunning);
if (setSystemProxy)
{
SetMachineProxy(port, interceptors);
}
}
}
private static async Task InterceptRequestAsync()
{
while (IsRunning && _listener != null)
{
try
{
TcpClient client = await _listener.AcceptTcpClientAsync().ConfigureAwait(false);
Task handleClientAsync = HandleClientAsync(client);
}
catch (ObjectDisposedException)
{
}
}
}
private static async Task HandleClientAsync(TcpClient client)
{
using var local = new EavesNode(Certifier, client);
WebRequest request = await local.ReadRequestAsync().ConfigureAwait(false);
if (request == null) return;
HttpContent requestContent = null;
var requestArgs = new RequestInterceptedEventArgs(request);
try
{
requestArgs.Content = requestContent = await local.ReadRequestContentAsync(request).ConfigureAwait(false);
await OnRequestInterceptedAsync(requestArgs).ConfigureAwait(false);
if (requestArgs.Cancel) return;
request = requestArgs.Request;
if (requestArgs.Content != null)
{
await local.WriteRequestContentAsync(request, requestArgs.Content).ConfigureAwait(false);
}
}
finally
{
requestContent?.Dispose();
requestArgs.Content?.Dispose();
}
WebResponse response = null;
try { response = await request.GetResponseAsync().ConfigureAwait(false); }
catch (WebException ex) { response = ex.Response; }
catch (ProtocolViolationException)
{
response?.Dispose();
response = null;
}
if (response == null) return;
HttpContent responseContent = null;
var responseArgs = new ResponseInterceptedEventArgs(request, response);
try
{
responseArgs.Content = responseContent = EavesNode.ReadResponseContent(response);
await OnResponseInterceptedAsync(responseArgs).ConfigureAwait(false);
if (responseArgs.Cancel) return;
await local.SendResponseAsync(responseArgs.Response, responseArgs.Content).ConfigureAwait(false);
}
finally
{
response.Dispose();
responseArgs.Response.Dispose();
responseContent?.Dispose();
responseArgs.Content?.Dispose();
}
}
private static void ResetMachineProxy()
{
INETOptions.Overrides.Clear();
INETOptions.IsIgnoringLocalTraffic = false;
INETOptions.HTTPAddress = null;
INETOptions.HTTPSAddress = null;
INETOptions.IsProxyEnabled = false;
INETOptions.Save();
}
private static void SetMachineProxy(int port, Interceptors interceptors)
{
foreach (string @override in Overrides)
{
if (INETOptions.Overrides.Contains(@override)) continue;
INETOptions.Overrides.Add(@override);
}
string address = ("127.0.0.1:" + port);
if (interceptors.HasFlag(Interceptors.HTTP))
{
INETOptions.HTTPAddress = address;
}
if (interceptors.HasFlag(Interceptors.HTTPS))
{
INETOptions.HTTPSAddress = address;
}
INETOptions.IsProxyEnabled = true;
INETOptions.IsIgnoringLocalTraffic = true;
INETOptions.Save();
}
}
}

View File

@ -0,0 +1,78 @@
using System;
using System.Net;
using System.Net.Http;
using System.ComponentModel;
namespace Eavesdrop
{
public class RequestInterceptedEventArgs : CancelEventArgs
{
private HttpWebRequest _httpRequest;
public HttpContent Content { get; set; }
private WebRequest _request;
public WebRequest Request
{
get => _request;
set
{
_request = value;
_httpRequest = (value as HttpWebRequest);
}
}
public Uri Uri => Request?.RequestUri;
public CookieContainer CookieContainer => _httpRequest?.CookieContainer;
public string Method
{
get => Request?.Method;
set
{
if (Request != null)
{
Request.Method = value;
}
}
}
public IWebProxy Proxy
{
get => Request?.Proxy;
set
{
if (Request != null)
{
Request.Proxy = value;
}
}
}
public string ContentType
{
get => Request?.ContentType;
set
{
if (Request != null)
{
Request.ContentType = value;
}
}
}
public WebHeaderCollection Headers
{
get => Request?.Headers;
set
{
if (Request != null)
{
Request.Headers = value;
}
}
}
public RequestInterceptedEventArgs(WebRequest request)
{
Request = request;
}
}
}

View File

@ -0,0 +1,65 @@
using System;
using System.Net;
using System.Net.Http;
using System.ComponentModel;
using System.Threading.Tasks;
using Eavesdrop.Network;
namespace Eavesdrop
{
public class ResponseInterceptedEventArgs : CancelEventArgs
{
private WebResponse _response;
public WebResponse Response
{
get => _response;
set
{
_response = value;
if (value is HttpWebResponse httpResponse)
{
CookieContainer = new CookieContainer();
CookieContainer.Add(httpResponse.Cookies);
}
else CookieContainer = null;
}
}
public WebRequest Request { get; }
public Uri Uri => Response?.ResponseUri;
public HttpContent Content { get; set; }
public CookieContainer CookieContainer { get; private set; }
public string ContentType
{
get => Response?.ContentType;
set
{
if (Response != null)
{
Response.ContentType = value;
}
}
}
public WebHeaderCollection Headers
{
get => Response?.Headers;
set
{
if (Response == null) return;
foreach (string header in value.AllKeys)
{
Response.Headers[header] = value[header];
}
}
}
public ResponseInterceptedEventArgs(WebRequest request, WebResponse response)
{
Request = request;
Response = response;
}
}
}

View File

@ -0,0 +1,14 @@
using System;
namespace Eavesdrop
{
[Flags]
public enum Interceptors
{
None = 0,
HTTP = 1,
HTTPS = 2,
Default = (HTTP | HTTPS)
}
}

View File

@ -0,0 +1,241 @@
using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Microsoft.Win32;
namespace Eavesdrop
{
public static class INETOptions
{
private static readonly object _stateLock;
private static readonly int _iNetOptionSize;
private static readonly int _iNetPackageSize;
private static readonly RegistryKey _proxyKey;
public static List<string> Overrides { get; }
public static string HTTPAddress { get; set; }
public static string HTTPSAddress { get; set; }
public static bool IsProxyEnabled { get; set; }
public static bool IsIgnoringLocalTraffic { get; set; }
static INETOptions()
{
_stateLock = new object();
_iNetOptionSize = Marshal.SizeOf(typeof(INETOption));
_iNetPackageSize = Marshal.SizeOf(typeof(INETPackage));
_proxyKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", true);
Overrides = new List<string>();
Load();
}
public static void Save()
{
lock (_stateLock)
{
var options = new List<INETOption>(3);
string joinedAddresses = (IsProxyEnabled ? GetJoinedAddresses() : null);
string joinedOverrides = (IsProxyEnabled ? GetJoinedOverrides() : null);
var kind = ProxyKind.PROXY_TYPE_DIRECT;
if (!string.IsNullOrWhiteSpace(joinedAddresses))
{
options.Add(new INETOption(OptionKind.INTERNET_PER_CONN_PROXY_SERVER, joinedAddresses));
if (!string.IsNullOrWhiteSpace(joinedOverrides))
{
options.Add(new INETOption(OptionKind.INTERNET_PER_CONN_PROXY_BYPASS, joinedOverrides));
}
kind |= ProxyKind.PROXY_TYPE_PROXY;
}
options.Insert(0, new INETOption(OptionKind.INTERNET_PER_CONN_FLAGS, (int)kind));
var inetPackage = new INETPackage
{
_optionError = 0,
_size = _iNetPackageSize,
_connection = IntPtr.Zero,
_optionCount = options.Count
};
IntPtr optionsPtr = Marshal.AllocCoTaskMem(_iNetOptionSize * options.Count);
for (int i = 0; i < options.Count; ++i)
{
var optionPtr = new IntPtr((IntPtr.Size == 4 ? optionsPtr.ToInt32() : optionsPtr.ToInt64()) + (i * _iNetOptionSize));
Marshal.StructureToPtr(options[i], optionPtr, false);
}
inetPackage._optionsPtr = optionsPtr;
IntPtr iNetPackagePtr = Marshal.AllocCoTaskMem(_iNetPackageSize);
Marshal.StructureToPtr(inetPackage, iNetPackagePtr, false);
int returnvalue = (NativeMethods.InternetSetOption(IntPtr.Zero, 75, iNetPackagePtr, _iNetPackageSize) ? -1 : 0);
if (returnvalue == 0)
{
returnvalue = Marshal.GetLastWin32Error();
}
Marshal.FreeCoTaskMem(optionsPtr);
Marshal.FreeCoTaskMem(iNetPackagePtr);
if (returnvalue > 0)
{
throw new Win32Exception(Marshal.GetLastWin32Error());
}
NativeMethods.InternetSetOption(IntPtr.Zero, 39, iNetPackagePtr, _iNetPackageSize);
NativeMethods.InternetSetOption(IntPtr.Zero, 37, iNetPackagePtr, _iNetPackageSize);
}
}
public static void Load()
{
lock (_stateLock)
{
LoadAddresses();
LoadOverrides();
IsProxyEnabled = (_proxyKey.GetValue("ProxyEnable")?.ToString() == "1");
}
}
private static void LoadOverrides()
{
string proxyOverride = _proxyKey.GetValue("ProxyOverride")?.ToString();
if (string.IsNullOrWhiteSpace(proxyOverride)) return;
string[] overrides = proxyOverride.Split(';');
foreach (string @override in overrides)
{
if (@override == "<local>")
{
IsIgnoringLocalTraffic = true;
}
else if (!Overrides.Contains(@override))
{
Overrides.Add(@override);
}
}
}
private static void LoadAddresses()
{
string proxyServer = _proxyKey.GetValue("ProxyServer")?.ToString();
if (string.IsNullOrWhiteSpace(proxyServer)) return;
string[] values = proxyServer.Split(';');
foreach (string value in values)
{
string[] pair = value.Split('=');
if (pair.Length != 2)
{
HTTPAddress = value;
HTTPSAddress = value;
return;
}
string address = pair[1];
string protocol = pair[0];
switch (protocol)
{
case "http": HTTPAddress = address; break;
case "https": HTTPSAddress = address; break;
}
}
}
private static string GetJoinedAddresses()
{
var addresses = new List<string>(2);
if (!string.IsNullOrWhiteSpace(HTTPAddress))
{
addresses.Add("http=" + HTTPAddress);
}
if (!string.IsNullOrWhiteSpace(HTTPSAddress))
{
addresses.Add("https=" + HTTPSAddress);
}
return string.Join(";", addresses);
}
private static string GetJoinedOverrides()
{
var overrides = new List<string>(Overrides);
if (IsIgnoringLocalTraffic)
{
overrides.Add("<local>");
}
return string.Join(";", overrides);
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
private struct INETOption
{
private readonly OptionKind _kind;
private readonly INETOptionValue _value;
public INETOption(OptionKind kind, int value)
{
_kind = kind;
_value = CreateValue(value);
}
public INETOption(OptionKind kind, string value)
{
_kind = kind;
_value = CreateValue(value);
}
private static INETOptionValue CreateValue(int value)
{
return new INETOptionValue
{
_intValue = value
};
}
private static INETOptionValue CreateValue(string value)
{
return new INETOptionValue
{
_stringPointer = Marshal.StringToHGlobalAuto(value)
};
}
[StructLayout(LayoutKind.Explicit)]
private struct INETOptionValue
{
[FieldOffset(0)]
public int _intValue;
[FieldOffset(0)]
public IntPtr _stringPointer;
[FieldOffset(0)]
public System.Runtime.InteropServices.ComTypes.FILETIME _fileTime;
}
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
private struct INETPackage
{
public int _size;
public IntPtr _connection;
public int _optionCount;
public int _optionError;
public IntPtr _optionsPtr;
}
[Flags]
private enum ProxyKind
{
PROXY_TYPE_DIRECT = 1,
PROXY_TYPE_PROXY = 2,
PROXY_TYPE_AUTO_PROXY_URL = 4,
PROXY_TYPE_AUTO_DETECT = 8
}
private enum OptionKind
{
INTERNET_PER_CONN_FLAGS = 1,
INTERNET_PER_CONN_PROXY_SERVER = 2,
INTERNET_PER_CONN_PROXY_BYPASS = 3,
INTERNET_PER_CONN_AUTOCONFIG_URL = 4
}
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Runtime.InteropServices;
namespace Eavesdrop
{
internal static class NativeMethods
{
[DllImport("wininet.dll", SetLastError = true, CharSet = CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr lpBuffer, int dwBufferLength);
}
}

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 ArachisH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Some files were not shown because too many files have changed in this diff Show More