Browse files

pac config for mac...

  • Loading branch information...
1 parent 1d1aebf commit 01913cc701e8dbd5ef98dc5407728f44e1a3af34 @iptton iptton committed Sep 18, 2012
Showing with 391 additions and 80 deletions.
  1. +2 −2 Rythem.pro
  2. +3 −1 deploy.txt
  3. +3 −0 httpfiles.qrc
  4. +52 −58 mainwindow.cpp
  5. +1 −0 mainwindow.h
  6. +307 −0 proxysetting.c
  7. +5 −4 publish
  8. +3 −0 rythem_pac
  9. +15 −15 rythem_zh_CN.ts
View
4 Rythem.pro
@@ -103,8 +103,8 @@ mac:CONFIG += app_bundle
win32:LIBS += D:\QtSDK\mingw\lib\libwininet.a
-#mac:LIBS += -framework SystemConfiguration -framework coreFoundation -lz
-mac:LIBS += -lz
+mac:LIBS += -framework SystemConfiguration -framework coreFoundation -lz
+#mac:LIBS += -lz
RESOURCES += \
httpfiles.qrc
View
4 deploy.txt
@@ -4,4 +4,6 @@ lrelease $1/Rythem.pro
cp -f $1/qt_zh_CN.qm $2/Rythem.app/Contents/MacOS/
cp -f $1/rythem_zh_CN.qm $2/Rythem.app/Contents/MacOS/
cp -f $1/setupproxy $2/Rythem.app/Contents/MacOS/
-cp -f $1/rythem.pac $2/Rythem.app/Contents/MacOS/
+#cp -f $1/rythem_pac $2/Rythem.app/Contents/MacOS/
+rm -f $2/Rythem.app/Contents/MacOS/proxysetting
+g++ $1/proxysetting.c -framework Security -o $2/Rythem.app/Contents/MacOS/proxysetting
View
3 httpfiles.qrc
@@ -38,4 +38,7 @@
<file>static/img16.png</file>
<file>remove.png</file>
</qresource>
+ <qresource prefix="/web">
+ <file>rythem_pac</file>
+ </qresource>
</RCC>
View
110 mainwindow.cpp
@@ -198,15 +198,39 @@ bool disableAutoProxyAndSetProxyForService(const QString& host, const int port){
return a & setProxyForService(host,port);
}
+
+bool execProxysetting(const QString &pacUrl=QString()){
+ QProcess process;
+ QString service = getServiceName();
+ QString script = "proxysetting";
+ if(pacUrl.isEmpty()){
+ script = QString("./proxysetting --disablepac %1").arg(service);
+ }else{
+ script = QString("./proxysetting --setpac %1 %2").arg(service,pacUrl);
+ }
+ qDebug()<<script;
+ process.start(script);
+ QEventLoop eventLoop;
+ eventLoop.connect(&process,SIGNAL(finished(int)),&eventLoop,SLOT(quit()));
+ eventLoop.exec();
+
+ qDebug()<<"output:\n"<<QString(process.readAllStandardOutput())<<QString(process.readAllStandardError())
+ <<QString("\nretcode:%1\n").arg(process.exitCode());
+ return process.exitCode() == 0;
+}
+
bool setPAC(const QString& url){
- return execScript(QString("networksetup -setautoproxyurl %1 %2").arg("%1",url));
+ return execProxysetting(url);
+ //return execScript(QString("networksetup -setautoproxyurl %1 %2").arg("%1",url));
}
bool setMyPAC(){
- return setPAC(QString("file://local%1/rythem.pac").arg(appPath));
+ return setPAC("http://127.0.0.1:8889/rythem_pac");
+ //return setPAC(QString("file://local%1/rythem_pac").arg(appPath));
}
bool disableMyPac(){
- return execScript(QString("networksetup -setautoproxystate %1 off"));
+ return execProxysetting();
+ //return execScript(QString("networksetup -setautoproxystate %1 off"));
}
@@ -290,7 +314,8 @@ QString RyJsBridge::getConfigs(){
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
- _isUsingCapture(false)
+ _isUsingCapture(false),
+ isFirstTimeToggle(true)
#ifdef Q_OS_WIN
,proxySetting("\\HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\",QSettings::NativeFormat)
@@ -587,7 +612,6 @@ void MainWindow::onWaterfallActionTriggered(){
}
}
-
void MainWindow::toggleProxy(){
QMutexLocker locker(&proxyMutex);
#ifdef Q_WS_MAC
@@ -596,65 +620,35 @@ void MainWindow::toggleProxy(){
if(_previousProxyInfo.isUsingPac == "1"){
setProxySuccess = setPAC(_previousProxyInfo.pacUrl);
}else{
- disableMyPac();
+ setProxySuccess = disableMyPac();
}
}else{
-
- QNetworkConfigurationManager mgr;
- QList<QNetworkConfiguration> activeConfigs = mgr.allConfigurations(QNetworkConfiguration::Active);
- QList<QString> activeNames;
- foreach(QNetworkConfiguration cf,activeConfigs){
- activeNames.append(cf.name());
- }
- ///Library/Preferences/SystemConfiguration
- QSettings::setPath(QSettings::NativeFormat,QSettings::SystemScope,"/Library/Preferences/SystemConfiguration/");
- QSettings plist("/Library/Preferences/SystemConfiguration/preferences.plist",QSettings::NativeFormat);
-
- QMap<QString,QVariant> services = plist.value("NetworkServices").toMap();
- QMap<QString,QVariant>::Iterator i;
- QString theServiceKey;
- QMap<QString,QVariant> theService;
- QMap<QString,QVariant> interface;
-
-
- for(i = services.begin();i!=services.end();i++){
- //qDebug()<<i.key();
- theService = i.value().toMap();
- theServiceKey = i.key();
- interface = theService["Interface"].toMap();
- //qDebug()<<"interface"<<interface;
- if(activeNames.contains(interface.value("DeviceName").toString())){
- //qDebug()<<"got it.."<<theService["Proxies"].toMap().value("HTTPEnable");
- //qDebug()<<theService["Proxies"].toMap().value("ProxyAutoConfigEnable");
- //ProxyAutoConfigURLString HTTPEnable HTTPProxy HTTPPort
- //qDebug()<<theService["Proxies"].toMap();
- break;
+ if(isFirstTimeToggle){
+ isFirstTimeToggle = false;
+ CFDictionaryRef proxies = SCDynamicStoreCopyProxies(NULL);
+ CFShow(proxies);
+ int isPacEnabled = 0;
+ if (proxies){
+ CFNumberRef pacEnabled;
+ //kSCPropNetProxiesHTTPSProxy
+ if ((pacEnabled = (CFNumberRef)CFDictionaryGetValue(proxies, kSCPropNetProxiesProxyAutoConfigEnable))){
+ if (CFNumberGetValue(pacEnabled, kCFNumberIntType, &pacEnabled) && pacEnabled){
+ isPacEnabled = 1;
+ _previousProxyInfo.isUsingPac = QString("1");
+ CFStringRef CFPacUrl = (CFStringRef)CFDictionaryGetValue(proxies, kSCPropNetProxiesProxyAutoConfigURLString);
+ _previousProxyInfo.pacUrl = QString::fromUtf8( CFStringGetCStringPtr(CFPacUrl,kCFStringEncodingUTF8) );
+ }
+ }
}
- }
- if(i!=services.end()){
- QMap<QString,QVariant> proxies = theService["Proxies"].toMap();
- qDebug()<<"proxies="<<proxies;
- qDebug()<<proxies.value("HTTPEnable");
- proxies["HTTPEnable"]=0;
- theService["Proxies"] = proxies;
- services[theServiceKey]=theService;
- _previousProxyInfo.isUsingPac = (proxies.value("ProxyAutoConfigEnable").toInt() == 1)?"1":"0";
- if(proxies.value("ProxyAutoConfigEnable").toInt() == 1){
- _previousProxyInfo.pacUrl = proxies.value("ProxyAutoConfigURLString").toString();
- }
- //TODO https http ftp
- if(proxies.value("HTTPEnable").toInt() == 1){
- _previousProxyInfo.proxyString = proxies.value("HTTPProxy").toString() + proxies.value("HTTPPort").toString();
+ //qDebug()<<QString("pacEnabeld %1").arg(isPacEnabled);
+ if(isPacEnabled){
+ qDebug()<<_previousProxyInfo.pacUrl;
+ ProxyAutoConfig::instance()->setConfigByUrl(_previousProxyInfo.pacUrl);
}else{
- _previousProxyInfo.enable = false;
+ // TODO check http&https proxy
}
- //qDebug()<<theService;
- }
- //execScript(QString("./setupproxy onlyATest %1 %2").arg("%1",( _previousProxyInfo.isUsingPac=="1"?"on":"off")));
- if(_previousProxyInfo.isUsingPac == "1"){
- ProxyAutoConfig::instance()->setConfigByUrl(_previousProxyInfo.pacUrl);
}
- setProxySuccess = setMyPAC();;
+ setProxySuccess = setMyPAC();
}
if(!setProxySuccess){// hack..
View
1 mainwindow.h
@@ -86,6 +86,7 @@ public slots:
QItemSelectionModel *_itemSelectModel;
RyUpdateChecker *checker;
+ bool isFirstTimeToggle;
QMutex proxyMutex;
protected:
View
307 proxysetting.c
@@ -0,0 +1,307 @@
+/*
+ * authtool.c
+ * VirtueDesktops
+ *
+ * Created by Tony on 14/06/06.
+ * Copyright 2006 boomBalada! Productions. All rights reserved.
+ *
+ */
+/*
+ * edit by iptton#gmail.com
+ *
+ */
+
+#include <Security/AuthorizationTags.h>
+//#include <SystemConfiguration/SystemConfiguration.h>
+//#include <CoreFoundation/CoreFoundation.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/types.h>
+#include <sys/fcntl.h>
+#include <sys/errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <mach-o/dyld.h>
+#include <Security/Authorization.h>
+#include <sys/param.h>
+#define DEBUG
+#if defined(DEBUG)
+# define IFDEBUG(code) code
+#else
+# define IFDEBUG(code) /* no-op */
+#endif
+
+
+// Command structure
+typedef struct MyAuthorizedCommand
+{
+ // Arguments to operate on
+ char file[MAXPATHLEN];
+} MyAuthorizedCommand;
+
+
+// Exit codes (positive values) and return codes from exec function
+enum
+{
+ kMyAuthorizedCommandInternalError = -1,
+ kMyAuthorizedCommandSuccess = 0,
+ kMyAuthorizedCommandExecFailed,
+ kMyAuthorizedCommandChildError,
+ kMyAuthorizedCommandAuthFailed,
+ kMyAuthorizedCommandOperationFailed
+};
+
+/*
+
+Boolean setProxy(){
+ SCDynamicStoreRef store = SCDynamicStoreCreate(kCFAllocatorSystemDefault, CFSTR("rythem"), NULL, NULL);
+
+
+ SCDynamicStoreRef dynRef=SCDynamicStoreCreate(kCFAllocatorSystemDefault, CFSTR("iked"), NULL, NULL);
+ CFDictionaryRef ipv4key = (CFDictionaryRef)SCDynamicStoreCopyValue(dynRef,CFSTR("State:/Network/Global/IPv4"));
+ CFStringRef primaryserviceid = (CFStringRef)CFDictionaryGetValue(ipv4key,CFSTR("PrimaryService"));
+ //Setup:/Network/Service/ServiceID/Proxies
+
+ CFStringRef primaryservicepath = (CFStringRef)CFStringCreateWithFormat(NULL,NULL,CFSTR("Setup:/Network/Service/%@/Proxies"),primaryserviceid);
+
+ //State:/Network/Service/CB3E440C-8D1B-4752-BBB1-E5F031C8D0C8/Proxies
+ CFMutableDictionaryRef newdnskey = CFDictionaryCreateMutable(NULL, 0, NULL,NULL);
+ CFDictionarySetValue(newdnskey,CFSTR("HTTPProxy"),CFSTR("127.9.9.1"));
+ CFDictionarySetValue(newdnskey,CFSTR("HTTPSProxy"),CFSTR("127.9.9.1"));
+ CFShow(newdnskey);
+ if(SCDynamicStoreSetValue(dynRef, primaryserviceid, newdnskey)){
+ printf("success.....\n");
+ }
+ CFRelease(dynRef);
+ int n=0;
+ bool k = SCDynamicStoreSetValue(store, primaryservicepath , newdnskey);
+ CFRelease(store);
+ return k;
+}
+void setDNS(){
+ //get current values
+ SCDynamicStoreRef dynRef=SCDynamicStoreCreate(kCFAllocatorSystemDefault, CFSTR("iked"), NULL, NULL);
+ CFDictionaryRef ipv4key = (CFDictionaryRef)SCDynamicStoreCopyValue(dynRef,CFSTR("State:/Network/Global/IPv4"));
+ CFStringRef primaryserviceid = (CFStringRef)CFDictionaryGetValue(ipv4key,CFSTR("PrimaryService"));
+ CFStringRef primaryservicepath = (CFStringRef)CFStringCreateWithFormat(NULL,NULL,CFSTR("State:/Network/Service/%@/DNS"),primaryserviceid);
+ CFDictionaryRef dnskey = (CFDictionaryRef)SCDynamicStoreCopyValue(dynRef,primaryservicepath);
+
+ //create new values
+ CFMutableDictionaryRef newdnskey = CFDictionaryCreateMutableCopy(NULL,0,dnskey);
+ CFDictionarySetValue(newdnskey,CFSTR("DomainName"),CFSTR("iptton.com"));
+
+ CFMutableArrayRef dnsserveraddresses = CFArrayCreateMutable(NULL,0,NULL);
+ CFArrayAppendValue(dnsserveraddresses, CFSTR("8.8.8.8"));
+ CFArrayAppendValue(dnsserveraddresses, CFSTR("4.3.2.2"));
+ CFDictionarySetValue(newdnskey, CFSTR("ServerAddresses"), dnsserveraddresses);
+
+ //set values
+ bool success = SCDynamicStoreSetValue(dynRef, primaryservicepath, newdnskey);
+ if(success){
+ printf("set DNS success\n");
+ }else{
+ printf("set DNS FAIL\n");
+ }
+ //clean up
+ CFRelease(dynRef);
+ CFRelease(primaryservicepath);
+ CFRelease(dnskey);
+ CFRelease(dnsserveraddresses);
+ CFRelease(newdnskey);
+}
+*/
+
+int runSelfByPriviledge(char *path_to_self){
+ AuthorizationRef authorizationRef;
+ AuthorizationItem right = { kAuthorizationRightExecute, 0, NULL, 0 };
+ AuthorizationRights rightSet = { 1, &right };
+ OSStatus status;
+ AuthorizationFlags flags = kAuthorizationFlagDefaults | kAuthorizationFlagPreAuthorize | kAuthorizationFlagInteractionAllowed | kAuthorizationFlagExtendRights;
+
+
+ /* Create a new authorization reference which will later be passed to the tool. */
+
+ status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &authorizationRef);
+
+ if (status != errAuthorizationSuccess)
+ {
+ IFDEBUG(fprintf(stderr, "Failed to create the authref: %ld.\n", status));
+ return kMyAuthorizedCommandInternalError;
+ }
+
+ /* This shows how AuthorizationCopyRights() can be used in order to pre-authorize the user before attempting to perform the privileged operation. Pre-authorization is optional but can be useful in certain situations. For example, in the Installer application, the user is asked to pre-authorize before configuring the installation because it would be a waste of time to let the user proceed through the entire installation setup, only to be denied at the final stage because they weren't the administrator. */
+
+ status = AuthorizationCopyRights(authorizationRef, &rightSet, kAuthorizationEmptyEnvironment, flags, NULL);
+
+ if (status == errAuthorizationSuccess)
+ {
+
+ int status;
+ int pid;
+ FILE *commPipe = NULL;
+ char *arguments[] = { "--self-repair", NULL };
+ char buffer[1024];
+
+ /* Set our own stdin and stderr to be the communication channel with ourself. */
+
+ IFDEBUG(fprintf(stderr, "Tool about to self-exec through AuthorizationExecuteWithPrivileges.\n");)
+ if (AuthorizationExecuteWithPrivileges(authorizationRef, path_to_self, kAuthorizationFlagDefaults, arguments, &commPipe))
+ return (kMyAuthorizedCommandInternalError);
+
+ /* Flush any remaining output. */
+ fflush(commPipe);
+
+ /* Close the communication pipe to let the child know we are done. */
+ fclose(commPipe);
+
+ /* Wait for the child of AuthorizationExecuteWithPrivileges to exit. */
+ pid = wait(&status);
+ fprintf(stderr,"child thread done %d %d \n",pid,status);
+ if (pid == -1 /*|| ! WIFEXITED(status)*/)
+ return kMyAuthorizedCommandInternalError;
+ fprintf(stderr,"child thread done success\n");
+ /* Exit with the same exit code as the child spawned by AuthorizationExecuteWithPrivileges() */
+ //exit(WEXITSTATUS(status));
+ return kMyAuthorizedCommandSuccess;
+ }
+
+ return 1;
+}
+
+int setpac(char *serviceName,char *pac){
+
+ //int comms[2] = {};
+ //pipe(comms);
+ pid_t pid;
+ int status;
+ int childStatus = 0;
+ int retcode;
+ switch(pid = fork())
+ {
+ case 0: /* Child */
+ {
+ char *const envp[] = { NULL };
+
+ //dup2(comms[1], 1);
+ //close(comms[0]);
+ //close(comms[1]);
+ //fprintf(stderr,"is child %s\n",path_to_self);
+ if (pac == 0){
+ retcode = execle("/usr/sbin/networksetup", "/usr/sbin/networksetup","-setautoproxystate",serviceName,"off",NULL,envp);
+ }else{
+ retcode = execle("/usr/sbin/networksetup", "/usr/sbin/networksetup","-setautoproxyurl",serviceName,pac,NULL,envp);
+ }
+ wait(&status);
+ fprintf(stderr,"child exited..%d \n",retcode);
+ _exit(0);
+ }
+ case -1: /* an error occured */
+ //close(comms[0]);
+ //close(comms[1]);
+ return kMyAuthorizedCommandInternalError;
+ default: /* Parent */
+ break;
+ }
+ printf("isparent");
+ /* Parent */
+ /* Don't abort the program if write fails. */
+ //signal(SIGPIPE, SIG_IGN);
+
+ /* Wait for the tool to return */
+ int wp = waitpid(pid, &childStatus, 0);
+ return 0;
+
+}
+int main(int argc, char* const argv[])
+{
+ OSStatus status;
+ AuthorizationRef auth;
+
+ uint32_t path_to_self_size = 0;
+ char *path_to_self = NULL;
+
+ printf("called authtool..\n");
+ path_to_self_size = MAXPATHLEN;
+ if (! (path_to_self = (char*)malloc(path_to_self_size))){
+ fprintf(stderr,"cannot alloc for path_to_self %s %s\n",argv[0],argv[1]);
+ exit(kMyAuthorizedCommandInternalError);
+ }
+ if (_NSGetExecutablePath(path_to_self, &path_to_self_size) == -1)
+ {
+ /* Try again with actual size */
+ if (! (path_to_self = (char*)realloc(path_to_self, path_to_self_size + 1)))
+ exit(kMyAuthorizedCommandInternalError);
+ if (_NSGetExecutablePath(path_to_self, &path_to_self_size) != 0)
+ exit(kMyAuthorizedCommandInternalError);
+ }
+
+ if(argc < 2){
+ fprintf(stderr,"need arguments\n");
+ return 1;
+ }
+ fprintf(stderr,"called:%s\n",argv[1]);
+
+ /* If we are not running as root we need to self-repair. */
+ if (geteuid() != 0)
+ {
+ if(kMyAuthorizedCommandSuccess == runSelfByPriviledge(path_to_self)){
+ fprintf(stderr,"relaunching\n");
+ execv(path_to_self,argv);
+ //system("/Users/pxz/Documents/cproject/authtool/authtool --setwebproxy");
+ return 0;
+ }else{
+ fprintf(stderr,"fail");
+ return 1;
+ }
+ }
+
+ if (path_to_self)
+ free(path_to_self);
+
+ if (argc >= 2 && !strcmp(argv[1], "--self-repair"))
+ {
+ /* Self repair code. We ran ourselves using AuthorizationExecuteWithPrivileges()
+ so we need to make ourselves setuid root to avoid the need for this the next time around. */
+
+ struct stat st;
+ int fd_tool;
+
+ /* Recover the passed in AuthorizationRef. */
+ if (AuthorizationCopyPrivilegedReference(&auth, kAuthorizationFlagDefaults))
+ exit(kMyAuthorizedCommandInternalError);
+
+ /* Open tool exclusively, so noone can change it while we bless it */
+ fd_tool = open(path_to_self, O_NONBLOCK|O_RDONLY|O_EXLOCK, 0);
+
+ if (fd_tool == -1)
+ {
+ IFDEBUG(fprintf(stderr, "Exclusive open while repairing tool failed: %d.\n", errno);)
+ exit(kMyAuthorizedCommandInternalError);
+ }
+
+ if (fstat(fd_tool, &st))
+ exit(kMyAuthorizedCommandInternalError);
+
+ if (st.st_uid != 0)
+ fchown(fd_tool, 0, st.st_gid);
+
+ /* Disable group and world writability and make setuid root. */
+ fchmod(fd_tool, (st.st_mode & (~(S_IWGRP|S_IWOTH))) | S_ISUID);
+
+ close(fd_tool);
+
+ IFDEBUG(fprintf(stderr, "Tool self-repair done.\n");)
+ return 0;
+
+ }
+
+ if(!strcmp(argv[1],"--setpac")){
+ printf("--setpac %s\n",argv[2],argv[3]);
+ return setpac(argv[2],argv[3]);
+
+ }else if(!strcmp(argv[1],"--disablepac")){
+ printf("--disablepac %s\n",argv[2]);
+ return setpac(argv[2],0);
+ }
+}
View
9 publish
@@ -9,12 +9,13 @@ targetDir=`echo "$tmp" | awk 'END{print $NF}'`
tmpDir=`pwd`
cd $targetDir
pwd
-ln -s /Applications $targetDir/Applications
+ln -s /Applications Applications
echo "introduce: http://www.alloyteam.com/2012/05/web-front-end-tool-rythem-1/" > $targetDir/readme.txt
+cd $tmpDir
#/usr/bin/drutil eject $targetDir
-hdiutil detach -force $dev
hdiutil convert Rythem-rw.dmg.sparseimage -format UDZO -o Rythem-release.dmg
mv -f Rythem-release.dmg ~/
-rm $tmpDir/Rythem-rw.dmg.sparseimage
-rm $tmpDir/Rythem.dmg
+hdiutil detach -force $dev
+#rm $tmpDir/Rythem-rw.dmg.sparseimage
+#rm $tmpDir/Rythem.dmg
View
3 rythem_pac
@@ -0,0 +1,3 @@
+function FindProxyForURL(url,host){
+ return "PROXY 127.0.0.1:8889";
+}
View
30 rythem_zh_CN.ts
@@ -145,7 +145,7 @@ Host: www.alloyteam.com
<translation type="obsolete">非windows系统需手动设置代理为 127.0.0.1:8889</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="377"/>
+ <location filename="mainwindow.cpp" line="402"/>
<source>-</source>
<translation type="unfinished">-</translation>
</message>
@@ -154,7 +154,7 @@ Host: www.alloyteam.com
<translation type="obsolete">请了</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="378"/>
+ <location filename="mainwindow.cpp" line="403"/>
<source>Please drag to Applications dir first
otherwise creat replace rule will cause crash on MacOS 10.8 (Mountain Lion)</source>
@@ -164,51 +164,51 @@ Host: www.alloyteam.com
否则在创建替换规则时 Rythem 会崩溃</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="386"/>
+ <location filename="mainwindow.cpp" line="411"/>
<source>&amp;File</source>
<translation type="unfinished">文件(&amp;F)</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="387"/>
+ <location filename="mainwindow.cpp" line="412"/>
<source>&amp;import session...</source>
<translation type="unfinished">导入会放(&amp;i)...</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="388"/>
+ <location filename="mainwindow.cpp" line="413"/>
<source>hide image requests</source>
<translation type="unfinished">隐藏图片请求</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="390"/>
+ <location filename="mainwindow.cpp" line="415"/>
<source>hide 304s</source>
<translation type="unfinished">隐藏304</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="392"/>
+ <location filename="mainwindow.cpp" line="417"/>
<source>show matching sessions only</source>
<translation type="unfinished">只显示匹配规则的请求</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="394"/>
+ <location filename="mainwindow.cpp" line="419"/>
<source>hide connect tunnels</source>
<translation type="unfinished">隐藏Connect遂道</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="402"/>
+ <location filename="mainwindow.cpp" line="427"/>
<source>select file to open</source>
<translation type="unfinished">选择文件</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="669"/>
- <location filename="mainwindow.cpp" line="698"/>
- <location filename="mainwindow.cpp" line="699"/>
+ <location filename="mainwindow.cpp" line="663"/>
+ <location filename="mainwindow.cpp" line="692"/>
+ <location filename="mainwindow.cpp" line="693"/>
<source>start capture</source>
<translation type="unfinished">开始抓包</translation>
</message>
<message>
- <location filename="mainwindow.cpp" line="678"/>
- <location filename="mainwindow.cpp" line="694"/>
- <location filename="mainwindow.cpp" line="695"/>
+ <location filename="mainwindow.cpp" line="672"/>
+ <location filename="mainwindow.cpp" line="688"/>
+ <location filename="mainwindow.cpp" line="689"/>
<source>stop capture</source>
<translation type="unfinished">停止抓包</translation>
</message>

0 comments on commit 01913cc

Please sign in to comment.