Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit 4f3792b

Browse files
committed
Copy HTTP Proxy Shell Export Line
1 parent 964e2af commit 4f3792b

File tree

6 files changed

+91
-8
lines changed

6 files changed

+91
-8
lines changed

V2RayX.xcodeproj/project.pbxproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
9577E1BE1C6B065E00093BD3 /* GCDWebServerStreamedResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 9577E1B11C6B065E00093BD3 /* GCDWebServerStreamedResponse.m */; };
3737
95A143CC1C87FCDC008756B9 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95A143CA1C87FC6E008756B9 /* Cocoa.framework */; };
3838
95E524CB1C674CC80008BB12 /* simple.pac in Resources */ = {isa = PBXBuildFile; fileRef = 95E524CA1C674CC80008BB12 /* simple.pac */; };
39-
95FF39661C68B2B900718EA0 /* config-sample.plist in Resources */ = {isa = PBXBuildFile; fileRef = 95FF39651C68B2B900718EA0 /* config-sample.plist */; };
4039
9D7109611E0F43BD008A6362 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 9D7109601E0F43BD008A6362 /* Credits.rtf */; };
4140
9D7DFE541EBEC947001FECBD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9D7DFE531EBEC947001FECBD /* main.m */; };
41+
9DB4FE951F205BEB00CCEE5F /* config-sample.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9DB4FE941F205BEB00CCEE5F /* config-sample.plist */; };
4242
/* End PBXBuildFile section */
4343

4444
/* Begin PBXContainerItemProxy section */
@@ -134,10 +134,10 @@
134134
95862BD41DB2862E00F4A9CA /* compilefromsource.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = compilefromsource.sh; sourceTree = "<group>"; };
135135
95A143CA1C87FC6E008756B9 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
136136
95E524CA1C674CC80008BB12 /* simple.pac */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = simple.pac; sourceTree = "<group>"; };
137-
95FF39651C68B2B900718EA0 /* config-sample.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "config-sample.plist"; sourceTree = "<group>"; };
138137
9D7109601E0F43BD008A6362 /* Credits.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = "<group>"; };
139138
9D7DFE511EBEC947001FECBD /* jsonplist */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = jsonplist; sourceTree = BUILT_PRODUCTS_DIR; };
140139
9D7DFE531EBEC947001FECBD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
140+
9DB4FE941F205BEB00CCEE5F /* config-sample.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "config-sample.plist"; sourceTree = "<group>"; };
141141
/* End PBXFileReference section */
142142

143143
/* Begin PBXFrameworksBuildPhase section */
@@ -212,8 +212,8 @@
212212
9504C07E1C662C3000352520 /* Supporting Files */ = {
213213
isa = PBXGroup;
214214
children = (
215-
95FF39651C68B2B900718EA0 /* config-sample.plist */,
216215
950F82311D9C01820066CB3A /* config-sample-rules.plist */,
216+
9DB4FE941F205BEB00CCEE5F /* config-sample.plist */,
217217
95E524CA1C674CC80008BB12 /* simple.pac */,
218218
9504C0D01C662E0800352520 /* install_helper.sh */,
219219
953B60551DB3F65A00D40654 /* dlcore.sh */,
@@ -413,14 +413,14 @@
413413
isa = PBXResourcesBuildPhase;
414414
buildActionMask = 2147483647;
415415
files = (
416+
9DB4FE951F205BEB00CCEE5F /* config-sample.plist in Resources */,
416417
950F82321D9C01820066CB3A /* config-sample-rules.plist in Resources */,
417418
95E524CB1C674CC80008BB12 /* simple.pac in Resources */,
418419
9504C0D11C66373400352520 /* install_helper.sh in Resources */,
419420
9504C0CF1C662DE300352520 /* v2rayx_sysconf in Resources */,
420421
9504C0821C662C3000352520 /* Assets.xcassets in Resources */,
421422
9D7109611E0F43BD008A6362 /* Credits.rtf in Resources */,
422423
9504C0851C662C3000352520 /* MainMenu.xib in Resources */,
423-
95FF39661C68B2B900718EA0 /* config-sample.plist in Resources */,
424424
9565E28B1DB25C010082658C /* transportWindow.xib in Resources */,
425425
9504C08D1C662C9100352520 /* ConfigWindow.xib in Resources */,
426426
);

V2RayX/AppDelegate.m

+5
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,11 @@ - (void)monitorPAC:(NSString *)filePath {
478478
FSEventStreamStart(fsEventStream);
479479
}
480480

481+
- (IBAction)copyExportCmd:(id)sender {
482+
[[NSPasteboard generalPasteboard] clearContents];
483+
[[NSPasteboard generalPasteboard] setString:@"export http_proxy=\"http://127.0.0.1:8001\"" forType:NSStringPboardType];
484+
}
485+
481486
void onPACChange(
482487
ConstFSEventStreamRef streamRef,
483488
void *clientCallBackInfo,

V2RayX/Base.lproj/MainMenu.xib

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1212" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12121"/>
66
</dependencies>
77
<objects>
88
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@@ -14,7 +14,10 @@
1414
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
1515
<customObject id="Voe-Tx-rLC" customClass="AppDelegate">
1616
<connections>
17+
<outlet property="ExportCmdItem" destination="2fK-AZ-akH" id="uAl-g6-ILH"/>
18+
<outlet property="copyExportCmdItem" destination="2fK-AZ-akH" id="8ih-wF-CRR"/>
1719
<outlet property="enabelV2rayItem" destination="I9I-uu-xak" id="b3P-ct-RqE"/>
20+
<outlet property="exportCmdItem" destination="2fK-AZ-akH" id="ajC-EG-s6I"/>
1821
<outlet property="globalModeItem" destination="12u-76-Ytb" id="RA8-m2-Iv6"/>
1922
<outlet property="pacModeItem" destination="Cm9-3e-L2z" id="TlL-GV-776"/>
2023
<outlet property="serverListMenu" destination="pPD-dn-4h0" id="6sH-L6-Uzx"/>
@@ -723,6 +726,13 @@
723726
</connections>
724727
</menuItem>
725728
<menuItem isSeparatorItem="YES" id="1ve-pA-4fu"/>
729+
<menuItem title="Copy HTTP Proxy Shell Export Line" id="2fK-AZ-akH">
730+
<modifierMask key="keyEquivalentModifierMask"/>
731+
<connections>
732+
<action selector="copyExportCmd:" target="Voe-Tx-rLC" id="OMz-Lv-Wmr"/>
733+
</connections>
734+
</menuItem>
735+
<menuItem isSeparatorItem="YES" id="YAD-DW-T91"/>
726736
<menuItem title="Help" id="Yq1-i5-ecF">
727737
<modifierMask key="keyEquivalentModifierMask"/>
728738
<connections>

V2RayX/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>0.7.5</string>
20+
<string>0.7.6</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>

V2RayX/config-sample-rules.plist

+34
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,40 @@
2929
<false/>
3030
</dict>
3131
</dict>
32+
<key>inboundDetour</key>
33+
<array>
34+
<dict>
35+
<key>allocate</key>
36+
<dict>
37+
<key>concurrency</key>
38+
<integer>3</integer>
39+
<key>refresh</key>
40+
<integer>5</integer>
41+
<key>strategy</key>
42+
<string>always</string>
43+
</dict>
44+
<key>domainOverride</key>
45+
<array>
46+
<string>http</string>
47+
<string>tls</string>
48+
</array>
49+
<key>listen</key>
50+
<string>127.0.0.1</string>
51+
<key>port</key>
52+
<string>8001</string>
53+
<key>protocol</key>
54+
<string>http</string>
55+
<key>settings</key>
56+
<dict>
57+
<key>timeout</key>
58+
<integer>0</integer>
59+
</dict>
60+
<key>streamSettings</key>
61+
<dict/>
62+
<key>tag</key>
63+
<string>httpDetour</string>
64+
</dict>
65+
</array>
3266
<key>log</key>
3367
<dict>
3468
<key>loglevel</key>

V2RayX/config-sample.plist

+34
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,40 @@
2929
<false/>
3030
</dict>
3131
</dict>
32+
<key>inboundDetour</key>
33+
<array>
34+
<dict>
35+
<key>allocate</key>
36+
<dict>
37+
<key>concurrency</key>
38+
<integer>3</integer>
39+
<key>refresh</key>
40+
<integer>5</integer>
41+
<key>strategy</key>
42+
<string>always</string>
43+
</dict>
44+
<key>domainOverride</key>
45+
<array>
46+
<string>http</string>
47+
<string>tls</string>
48+
</array>
49+
<key>listen</key>
50+
<string>127.0.0.1</string>
51+
<key>port</key>
52+
<string>8001</string>
53+
<key>protocol</key>
54+
<string>http</string>
55+
<key>settings</key>
56+
<dict>
57+
<key>timeout</key>
58+
<integer>0</integer>
59+
</dict>
60+
<key>streamSettings</key>
61+
<dict/>
62+
<key>tag</key>
63+
<string>httpDetour</string>
64+
</dict>
65+
</array>
3266
<key>log</key>
3367
<dict>
3468
<key>loglevel</key>

0 commit comments

Comments
 (0)