Skip to content

Commit

Permalink
feat: copy alt host
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodCoder666 committed May 28, 2024
1 parent 218b352 commit ac942d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,8 @@ def on_btnResult_Copy_clicked(self):
return
self.ui.resultTable.sortItems(1, Qt.AscendingOrder)
fastest_ip = self.ui.resultTable.item(0, 0).text()
new_hosts = f'{fastest_ip} {HOST}'
self.clipboard.setText(new_hosts)
self.ui.statusbar.showMessage(f'成功复制最佳 IP [{new_hosts}]')
self.clipboard.setText(f'{fastest_ip} {HOST}\n{fastest_ip} {HOST2}\n')
self.ui.statusbar.showMessage(f'成功复制最佳 IP [{fastest_ip} {HOST}/{HOST2}]')

def __writeHosts(self, ip, host):
hosts_path = r'C:\Windows\System32\drivers\etc\hosts' if sys.platform == 'win32' else '/etc/hosts'
Expand Down
2 changes: 1 addition & 1 deletion res_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
\x00\x00\x00\x12\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x22\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x8eG\x87\x9f\x88\
\x00\x00\x01\x8f\x15\x93\xc1\xbc\
"

def qInitResources():
Expand Down

0 comments on commit ac942d5

Please sign in to comment.