├── .github
└── workflows
│ └── tg-notify.yml
├── .gitignore
├── .project
├── .pydevproject
├── CHANGELOG.md
├── LICENSE
├── README.md
├── assets
├── MN-logo.png
└── SubPlan-Dialog-Interface.png
├── build.sh
├── build
└── Debian
│ ├── template
│ ├── DEBIAN
│ │ └── control
│ └── usr
│ │ └── share
│ │ ├── applications
│ │ └── meile.desktop
│ │ └── pixmaps
│ │ └── meile.png
│ └── template_vm
│ ├── DEBIAN
│ ├── control
│ └── postinst
│ └── usr
│ ├── local
│ └── bin
│ │ └── meile-gui
│ └── share
│ ├── applications
│ └── meile.desktop
│ └── pixmaps
│ └── meile.png
├── build_rh.sh
├── dpkg.build
├── img
├── ARRR.png
├── BTC.png
├── DVPN.png
├── XMR.png
└── session_qr.png
├── meile_gui.spec
├── pyinstaller.cmd
├── requirements.txt
├── setup.py
├── src
├── adapters
│ ├── ChangeDNS.py
│ ├── DNSCryptproxy.py
│ ├── DNSRequests.py
│ ├── HTTPRequests.py
│ └── __init__.py
├── awoc
│ ├── __init__.py
│ └── datum
│ │ └── world.json
├── bin
│ ├── __init__.py
│ ├── dnscrypt-proxy
│ ├── dnscrypt-proxy.toml
│ ├── routes.sh
│ ├── run_dnscrypt.sh
│ ├── tun2socks
│ ├── v2ray
│ ├── warp-cli
│ └── warp-svc
├── cli
│ ├── __init__.py
│ ├── btcpay.py
│ ├── sentinel.py
│ ├── v2ray.py
│ ├── wallet.py
│ └── warp.py
├── coin_api
│ ├── __init__.py
│ └── get_price.py
├── conf
│ ├── __init__.py
│ ├── config.ini
│ ├── config
│ │ ├── config.ini
│ │ └── dnscrypt-proxy.toml
│ └── meile_config.py
├── fiat
│ ├── __init__.py
│ ├── fiat_interface.py
│ └── stripe_pay
│ │ ├── __init__.py
│ │ └── charge.py
├── fonts
│ ├── Roboto-BoldItalic.ttf
│ └── mplus-2c-bold.ttf
├── geography
│ ├── __init__.py
│ └── continents.py
├── helpers
│ ├── __init__.py
│ ├── bandwidth.py
│ ├── helpers.py
│ └── wireguard.py
├── imgs
│ ├── ConnectButton.png
│ ├── DisconnectButton.png
│ ├── GetInfoButton.png
│ ├── SubscribeButton.png
│ ├── __init__.py
│ ├── atom.png
│ ├── dec.png
│ ├── dvpn.png
│ ├── flags
│ │ ├── ad.png
│ │ ├── ae.png
│ │ ├── af.png
│ │ ├── ag.png
│ │ ├── ai.png
│ │ ├── al.png
│ │ ├── am.png
│ │ ├── ao.png
│ │ ├── aq.png
│ │ ├── ar.png
│ │ ├── as.png
│ │ ├── at.png
│ │ ├── au.png
│ │ ├── aw.png
│ │ ├── ax.png
│ │ ├── az.png
│ │ ├── ba.png
│ │ ├── bb.png
│ │ ├── bd.png
│ │ ├── be.png
│ │ ├── bf.png
│ │ ├── bg.png
│ │ ├── bh.png
│ │ ├── bi.png
│ │ ├── bj.png
│ │ ├── bl.png
│ │ ├── bm.png
│ │ ├── bn.png
│ │ ├── bo.png
│ │ ├── bq.png
│ │ ├── br.png
│ │ ├── bs.png
│ │ ├── bt.png
│ │ ├── bv.png
│ │ ├── bw.png
│ │ ├── by.png
│ │ ├── bz.png
│ │ ├── ca.png
│ │ ├── cc.png
│ │ ├── cd.png
│ │ ├── cf.png
│ │ ├── cg.png
│ │ ├── ch.png
│ │ ├── ci.png
│ │ ├── ck.png
│ │ ├── cl.png
│ │ ├── cm.png
│ │ ├── cn.png
│ │ ├── co.png
│ │ ├── cr.png
│ │ ├── cu.png
│ │ ├── cv.png
│ │ ├── cw.png
│ │ ├── cx.png
│ │ ├── cy.png
│ │ ├── cz.png
│ │ ├── de.png
│ │ ├── dj.png
│ │ ├── dk.png
│ │ ├── dm.png
│ │ ├── do.png
│ │ ├── dz.png
│ │ ├── ec.png
│ │ ├── ee.png
│ │ ├── eg.png
│ │ ├── eh.png
│ │ ├── er.png
│ │ ├── es.png
│ │ ├── et.png
│ │ ├── fi.png
│ │ ├── fj.png
│ │ ├── fk.png
│ │ ├── fm.png
│ │ ├── fo.png
│ │ ├── fr.png
│ │ ├── ga.png
│ │ ├── gb-eng.png
│ │ ├── gb-nir.png
│ │ ├── gb-sct.png
│ │ ├── gb-wls.png
│ │ ├── gb.png
│ │ ├── gd.png
│ │ ├── ge.png
│ │ ├── gf.png
│ │ ├── gg.png
│ │ ├── gh.png
│ │ ├── gi.png
│ │ ├── gl.png
│ │ ├── gm.png
│ │ ├── gn.png
│ │ ├── gp.png
│ │ ├── gq.png
│ │ ├── gr.png
│ │ ├── gs.png
│ │ ├── gt.png
│ │ ├── gu.png
│ │ ├── gw.png
│ │ ├── gy.png
│ │ ├── hk.png
│ │ ├── hm.png
│ │ ├── hn.png
│ │ ├── hr.png
│ │ ├── ht.png
│ │ ├── hu.png
│ │ ├── id.png
│ │ ├── ie.png
│ │ ├── il.png
│ │ ├── im.png
│ │ ├── in.png
│ │ ├── io.png
│ │ ├── iq.png
│ │ ├── ir.png
│ │ ├── is.png
│ │ ├── it.png
│ │ ├── je.png
│ │ ├── jm.png
│ │ ├── jo.png
│ │ ├── jp.png
│ │ ├── ke.png
│ │ ├── kg.png
│ │ ├── kh.png
│ │ ├── ki.png
│ │ ├── km.png
│ │ ├── kn.png
│ │ ├── kp.png
│ │ ├── kr.png
│ │ ├── kw.png
│ │ ├── ky.png
│ │ ├── kz.png
│ │ ├── la.png
│ │ ├── lb.png
│ │ ├── lc.png
│ │ ├── li.png
│ │ ├── lk.png
│ │ ├── lr.png
│ │ ├── ls.png
│ │ ├── lt.png
│ │ ├── lu.png
│ │ ├── lv.png
│ │ ├── ly.png
│ │ ├── ma.png
│ │ ├── mc.png
│ │ ├── md.png
│ │ ├── me.png
│ │ ├── mf.png
│ │ ├── mg.png
│ │ ├── mh.png
│ │ ├── mk.png
│ │ ├── ml.png
│ │ ├── mm.png
│ │ ├── mn.png
│ │ ├── mo.png
│ │ ├── mp.png
│ │ ├── mq.png
│ │ ├── mr.png
│ │ ├── ms.png
│ │ ├── mt.png
│ │ ├── mu.png
│ │ ├── mv.png
│ │ ├── mw.png
│ │ ├── mx.png
│ │ ├── my.png
│ │ ├── mz.png
│ │ ├── na.png
│ │ ├── nc.png
│ │ ├── ne.png
│ │ ├── nf.png
│ │ ├── ng.png
│ │ ├── ni.png
│ │ ├── nl.png
│ │ ├── no.png
│ │ ├── np.png
│ │ ├── nr.png
│ │ ├── nu.png
│ │ ├── nz.png
│ │ ├── om.png
│ │ ├── pa.png
│ │ ├── pe.png
│ │ ├── pf.png
│ │ ├── pg.png
│ │ ├── ph.png
│ │ ├── pk.png
│ │ ├── pl.png
│ │ ├── pm.png
│ │ ├── pn.png
│ │ ├── pr.png
│ │ ├── ps.png
│ │ ├── pt.png
│ │ ├── pw.png
│ │ ├── py.png
│ │ ├── qa.png
│ │ ├── re.png
│ │ ├── ro.png
│ │ ├── rs.png
│ │ ├── ru.png
│ │ ├── rw.png
│ │ ├── sa.png
│ │ ├── sb.png
│ │ ├── sc.png
│ │ ├── sd.png
│ │ ├── se.png
│ │ ├── sg.png
│ │ ├── sh.png
│ │ ├── si.png
│ │ ├── sj.png
│ │ ├── sk.png
│ │ ├── sl.png
│ │ ├── sm.png
│ │ ├── sn.png
│ │ ├── so.png
│ │ ├── sr.png
│ │ ├── ss.png
│ │ ├── st.png
│ │ ├── sv.png
│ │ ├── sx.png
│ │ ├── sy.png
│ │ ├── sz.png
│ │ ├── tc.png
│ │ ├── td.png
│ │ ├── tf.png
│ │ ├── tg.png
│ │ ├── th.png
│ │ ├── tj.png
│ │ ├── tk.png
│ │ ├── tl.png
│ │ ├── tm.png
│ │ ├── tn.png
│ │ ├── to.png
│ │ ├── tr.png
│ │ ├── tt.png
│ │ ├── tv.png
│ │ ├── tw.png
│ │ ├── tz.png
│ │ ├── ua.png
│ │ ├── ug.png
│ │ ├── um.png
│ │ ├── us.png
│ │ ├── uy.png
│ │ ├── uz.png
│ │ ├── va.png
│ │ ├── vc.png
│ │ ├── ve.png
│ │ ├── vg.png
│ │ ├── vi.png
│ │ ├── vn.png
│ │ ├── vu.png
│ │ ├── wf.png
│ │ ├── ws.png
│ │ ├── xk.png
│ │ ├── ye.png
│ │ ├── yt.png
│ │ ├── za.png
│ │ ├── zm.png
│ │ └── zw.png
│ ├── icon.png
│ ├── imgage_list.sh
│ ├── location_pin.png
│ ├── logo.png
│ ├── logo_hd.png
│ ├── logo_text.png
│ ├── osmo.png
│ ├── scrt.png
│ ├── spinner.png
│ └── tenor.gif
├── kv
│ ├── __init__.py
│ └── meile.kv
├── main
│ ├── __init__.py
│ ├── icon.png
│ ├── main.py
│ └── meile_gui.py
├── typedef
│ ├── __init__.py
│ ├── konstants.py
│ └── win.py
├── ui
│ ├── __init__.py
│ ├── interfaces.py
│ ├── screens.py
│ └── widgets.py
└── utils
│ ├── __init__.py
│ ├── coinimg
│ ├── __init__.py
│ └── dvpn.png
│ ├── fonts
│ ├── Roboto-BoldItalic.ttf
│ └── __init__.py
│ └── qr.py
└── tests
├── GetInfoButton.png
├── SubscribeButton.png
├── at.png
├── blah.png
├── canvas.py
├── card.py
├── card2.py
├── change_screens.py
├── cli
├── __pycache__
│ └── wallet.cpython-38.pyc
└── wallet.py
├── config_parser_test.py
├── continents.py
├── determine_denom.py
├── dialog.py
├── dialog_sub_type.py
├── dropdown.py
├── fiat_interface.py
├── getres.py
├── gradient.py
├── help_screen.py
├── label_change.py
├── listdict.py
├── logo.png
├── moar_swipe.py
├── mod.py
├── node_carousel.py
├── progress_bar.py
├── py_environ.py
├── readofile.py
├── rv-card.py
├── rv-stuff.py
├── rv_card_swipe.py
├── rv_country_swipe_drilldown.py
├── rv_select.py
├── rv_subs.py
├── seed_field.py
├── slidery.py
├── slidery_months.py
├── slidery_plan.py
├── speedparse.py
├── stripe_pay
├── __init__.py
└── charge.py
├── successfull_subscription.json
├── timestamp.py
├── toolbar.py
├── tree
├── continents.py
└── nodetree.py
├── v2
├── main_screen.py
└── uix
│ ├── __init__.py
│ └── expansionpanel.py
├── wallet.py
├── wallet_interface.py
├── win.py
└── worlds_czechia.py
/.github/workflows/tg-notify.yml:
--------------------------------------------------------------------------------
1 | name: tg-notify
2 | on: [push, pull_request]
3 | jobs:
4 | build:
5 | runs-on: ubuntu-latest
6 | steps:
7 | - name: Update status
8 | uses: appleboy/telegram-action@master
9 | with:
10 | to: ${{ secrets.TELEGRAM_TO }}
11 | token: ${{ secrets.TELEGRAM_TOKEN }}
12 | message: | #https://help.github.com/en/actions/reference/contexts-and-expression-syntax-for-github-actions#github-context
13 | ${{ github.actor }} created commit:
14 | Commit message: ${{ github.event.head_commit.message }}
15 |
16 | Repository: ${{ github.repository }}
17 |
18 | Branch: ${{ github.ref_name }}
19 |
20 | See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}}
21 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | #build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | share/python-wheels/
24 | *.egg-info/
25 | .installed.cfg
26 | *.egg
27 | MANIFEST
28 |
29 | # PyInstaller
30 | # Usually these files are written by a python script from a template
31 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
32 | *.manifest
33 | *.spec
34 |
35 | # Installer logs
36 | pip-log.txt
37 | pip-delete-this-directory.txt
38 |
39 | # Unit test / coverage reports
40 | htmlcov/
41 | .tox/
42 | .nox/
43 | .coverage
44 | .coverage.*
45 | .cache
46 | nosetests.xml
47 | coverage.xml
48 | *.cover
49 | *.py,cover
50 | .hypothesis/
51 | .pytest_cache/
52 | cover/
53 |
54 | # Translations
55 | *.mo
56 | *.pot
57 |
58 | # Django stuff:
59 | *.log
60 | local_settings.py
61 | db.sqlite3
62 | db.sqlite3-journal
63 |
64 | # Flask stuff:
65 | instance/
66 | .webassets-cache
67 |
68 | # Scrapy stuff:
69 | .scrapy
70 |
71 | # Sphinx documentation
72 | docs/_build/
73 |
74 | # PyBuilder
75 | .pybuilder/
76 | target/
77 |
78 | # Jupyter Notebook
79 | .ipynb_checkpoints
80 |
81 | # IPython
82 | profile_default/
83 | ipython_config.py
84 |
85 | # pyenv
86 | # For a library or package, you might want to ignore these files since the code is
87 | # intended to run in multiple environments; otherwise, check them in:
88 | # .python-version
89 |
90 | # pipenv
91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
94 | # install all needed dependencies.
95 | #Pipfile.lock
96 |
97 | # poetry
98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99 | # This is especially recommended for binary packages to ensure reproducibility, and is more
100 | # commonly ignored for libraries.
101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102 | #poetry.lock
103 |
104 | # pdm
105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106 | #pdm.lock
107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108 | # in version control.
109 | # https://pdm.fming.dev/#use-with-ide
110 | .pdm.toml
111 |
112 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113 | __pypackages__/
114 |
115 | # Celery stuff
116 | celerybeat-schedule
117 | celerybeat.pid
118 |
119 | # SageMath parsed files
120 | *.sage.py
121 |
122 | # Environments
123 | .env
124 | .venv
125 | env/
126 | venv/
127 | ENV/
128 | env.bak/
129 | venv.bak/
130 |
131 | # Spyder project settings
132 | .spyderproject
133 | .spyproject
134 |
135 | # Rope project settings
136 | .ropeproject
137 |
138 | # mkdocs documentation
139 | /site
140 |
141 | # mypy
142 | .mypy_cache/
143 | .dmypy.json
144 | dmypy.json
145 |
146 | # Pyre type checker
147 | .pyre/
148 |
149 | # pytype static type analyzer
150 | .pytype/
151 |
152 | # Cython debug symbols
153 | cython_debug/
154 |
155 | # PyCharm
156 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158 | # and can be added to the global gitignore or merged into this file. For a more nuclear
159 | # option (not recommended) you can uncomment the following to ignore the entire idea folder.
160 | #.idea/
161 |
162 | # Custom
163 | scrtsxx.py
164 | scrtxxs.py
165 |
166 | src/meile_gui.egg-info/
167 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | Meile-GUI-git
4 |
5 |
6 |
7 |
8 |
9 | org.python.pydev.PyDevBuilder
10 |
11 |
12 |
13 |
14 |
15 | org.python.pydev.pythonNature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.pydevproject:
--------------------------------------------------------------------------------
1 |
2 |
3 | Default
4 | python interpreter
5 |
6 |
--------------------------------------------------------------------------------
/assets/MN-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/assets/MN-logo.png
--------------------------------------------------------------------------------
/assets/SubPlan-Dialog-Interface.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/assets/SubPlan-Dialog-Interface.png
--------------------------------------------------------------------------------
/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [[ $# -lt 1 ]]; then
4 | echo "Usage: $0 "
5 | exit
6 | fi
7 |
8 | new_version="$1"
9 | ubuntu_version=`cat /etc/os-release | grep VERSION_ID | cut -d '"' -f 2 | sed -e 's/\.//g'`
10 | build_version=`date +%s%3N`
11 |
12 | sed -i "s/VERSION = \".*\"/VERSION = \"$new_version\"/" src/typedef/konstants.py
13 | sed -i "s/BUILD = \".*\"/BUILD = \"$build_version\"/" src/typedef/konstants.py
14 |
15 | source meile310/bin/activate
16 |
17 | # Linux
18 | pyinstaller --onefile --collect-all bip_utils --collect-all mospy --collect-all sentinel_protobuf --collect-all sentinel_sdk --collect-all stripe --collect-all kivy_garden --add-data src/fiat/stripe_pay/dist/pyarmor_runtime_002918:pyarmor_runtime_002918 --add-data src/fonts:../fonts --add-data src/awoc/datum/:datum --add-data src/utils/fonts/:../utils/fonts --add-data src/utils/coinimg/:../utils/coinimg --add-data src/imgs/:../imgs --add-data src/kv/:../kv --add-data src/conf/config/:config --add-data src/bin/:../bin src/main/meile_gui.py
19 |
20 | version=$(echo "$1" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+)$/\1/')
21 |
22 | if [[ -z "$version" ]]; then
23 | echo "Invalid version format. Please use the format 'vX.Y.Z'."
24 | exit 1
25 | fi
26 |
27 | rm -rf meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64/
28 | rm -rf meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64_vm/
29 |
30 | rm -rf *.deb
31 |
32 | mkdir meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64
33 | mkdir meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64_vm
34 |
35 | control_file="template/DEBIAN/control"
36 | control_file_vm="template_vm/DEBIAN/control"
37 |
38 | if [[ -f "$control_file" ]]; then
39 | sed -i "s/^Version:.*$/Version: $version/" "$control_file"
40 | echo "Control file updated with version $version."
41 | else
42 | echo "Control file not found: $control_file"
43 | exit 1
44 | fi
45 |
46 | if [[ -f "$control_file_vm" ]]; then
47 | sed -i "s/^Version:.*$/Version: $version/" "$control_file_vm"
48 | echo "Control file updated with version $version."
49 | else
50 | echo "Control file not found: $control_file_vm"
51 | exit 1
52 | fi
53 |
54 |
55 |
56 | cp -R template/* meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64/
57 | cp -R template_vm/* meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64_vm/
58 |
59 | cp dist/meile_gui meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64/usr/local/bin/meile-gui
60 | cp dist/meile_gui meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64_vm/usr/local/bin/meile_gui
61 |
62 | dpkg-deb --build --root-owner-group meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64
63 | dpkg-deb --build --root-owner-group meile-gui-v"$version"_ubuntu"$ubuntu_version"_amd64_vm
64 |
--------------------------------------------------------------------------------
/build/Debian/template/DEBIAN/control:
--------------------------------------------------------------------------------
1 | Package: meile-gui
2 | Version: 2.0.5
3 | Architecture: amd64
4 | Depends: wireguard-tools (>= 1.0), mesa-utils (>=8.4.0), xclip (>=0.13), curl (>=7.68.0), net-tools (>=1.60)
5 | Maintainer: freQniK
6 | Description: Meile dVPN GUI for Sentinel
7 | This is a desktop gui dVPN client, called Meile, which means "for us" in Estonian. It provides decentralized VPN access through the Sentinel Blockchain on Cosmos.
8 |
--------------------------------------------------------------------------------
/build/Debian/template/usr/share/applications/meile.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=Meile
3 | Comment=A decentralized VPN client based on the Sentinel Network.
4 | Exec=/usr/local/bin/meile-gui
5 | Icon=meile
6 | Terminal=false
7 | Type=Application
8 | Categories=Network;Application;
9 | MimeType=
10 |
11 |
--------------------------------------------------------------------------------
/build/Debian/template/usr/share/pixmaps/meile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/build/Debian/template/usr/share/pixmaps/meile.png
--------------------------------------------------------------------------------
/build/Debian/template_vm/DEBIAN/control:
--------------------------------------------------------------------------------
1 | Package: meile-gui
2 | Version: 2.0.5
3 | Architecture: amd64
4 | Depends: wireguard-tools (>= 1.0), mesa-utils (>=8.4.0), xclip (>=0.13), curl (>=7.68.0), net-tools (>=1.60)
5 | Maintainer: freQniK
6 | Description: Meile dVPN GUI for Sentinel
7 | This is a desktop gui dVPN client, called Meile, which means "for us" in Estonian. It provides decentralized VPN access through the Sentinel Blockchain on Cosmos.
8 |
--------------------------------------------------------------------------------
/build/Debian/template_vm/DEBIAN/postinst:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # For Linux Virtual Machines
3 |
4 |
5 | # Link the glx driver libraries to appropriate spot
6 | DRIDIR="/usr/lib/x86_64-linux-gnu/dri/"
7 | VMDIR="/usr/lib/dri/"
8 | mapfile -t glx_drivers < <(ls -1 ${DRIDIR})
9 |
10 | # Make the DRI directory
11 | mkdir -p /usr/lib/dri
12 |
13 |
14 | # Link all files to the DRI Directory
15 | for drv in ${glx_drivers[@]}; do
16 | ln -s ${DRIDIR}${drv} ${VMDIR}{$drv}
17 | done
18 |
--------------------------------------------------------------------------------
/build/Debian/template_vm/usr/local/bin/meile-gui:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/local/bin/meile_gui
4 |
--------------------------------------------------------------------------------
/build/Debian/template_vm/usr/share/applications/meile.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=Meile
3 | Comment=A decentralized VPN client based on the Sentinel Network.
4 | Exec=/usr/local/bin/meile-gui
5 | Icon=meile
6 | Terminal=false
7 | Type=Application
8 | Categories=Network;Application;
9 | MimeType=
10 |
11 |
--------------------------------------------------------------------------------
/build/Debian/template_vm/usr/share/pixmaps/meile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/build/Debian/template_vm/usr/share/pixmaps/meile.png
--------------------------------------------------------------------------------
/build_rh.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Redhat build script
4 |
5 | if [[ $# -lt 1 ]]; then
6 | echo "Usage: $0 "
7 | exit
8 | fi
9 |
10 | new_version="$1"
11 | build_version=`date +%s%3N`
12 |
13 | sed -i "s/VERSION = \".*\"/VERSION = \"$new_version\"/" src/typedef/konstants.py
14 | sed -i "s/BUILD = \".*\"/BUILD = \"$build_version\"/" src/typedef/konstants.py
15 |
16 | # Linux
17 | pyinstaller --onefile --collect-all bip_utils --collect-all mospy --collect-all sentinel_protobuf --collect-all sentinel_sdk --collect-all stripe --collect-all kivy_garden --add-data src/fiat/stripe_pay/dist/pyarmor_runtime_002918:pyarmor_runtime_002918 --add-data src/fonts:../fonts --add-data src/awoc/datum/:datum --add-data src/utils/fonts/:../utils/fonts --add-data src/utils/coinimg/:../utils/coinimg --add-data src/imgs/:../imgs --add-data src/kv/:../kv --add-data src/conf/config/:config --add-data src/bin/:../bin src/main/meile_gui.py
18 |
19 | version=$(echo "$1" | sed -E 's/^v([0-9]+\.[0-9]+\.[0-9]+)$/\1/')
20 |
21 | if [[ -z "$version" ]]; then
22 | echo "Invalid version format. Please use the format 'vX.Y.Z'."
23 | exit 1
24 | fi
25 |
26 | mkdir -p dist/meile-gui-$version
27 | mv dist/meile_gui dist/meile-gui-$version/meile-gui
28 |
29 | cd dist
30 | tar cvzf meile-gui-$version.tar.gz meile-gui-$version
31 | cd ..
32 | cp dist/meile-gui-$version.tar.gz $HOME/rpmbuild/SOURCES
33 |
34 | spec_file="$HOME/rpmbuild/SPECS/meile-gui.spec"
35 | if [[ -f "$spec_file" ]]; then
36 | sed -i "s/^Version:.*$/Version: $version/" "$spec_file"
37 | echo "Spec file updated with version $version."
38 | else
39 | echo "Spec file not found: $spec_file"
40 | exit 1
41 | fi
42 |
43 | rpmbuild -bb $spec_file
44 |
45 |
--------------------------------------------------------------------------------
/dpkg.build:
--------------------------------------------------------------------------------
1 | dpkg-deb --build --root-owner-group meile-gui-v1.8.0_ubuntu2004_amd64
2 |
--------------------------------------------------------------------------------
/img/ARRR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/img/ARRR.png
--------------------------------------------------------------------------------
/img/BTC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/img/BTC.png
--------------------------------------------------------------------------------
/img/DVPN.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/img/DVPN.png
--------------------------------------------------------------------------------
/img/XMR.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/img/XMR.png
--------------------------------------------------------------------------------
/img/session_qr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/img/session_qr.png
--------------------------------------------------------------------------------
/meile_gui.spec:
--------------------------------------------------------------------------------
1 | # -*- mode: python ; coding: utf-8 -*-
2 |
3 |
4 | block_cipher = None
5 |
6 |
7 | a = Analysis(
8 | ['src/main/meile_gui.py'],
9 | pathex=[],
10 | binaries=[],
11 | datas=[('src/awoc/data/', 'data'), ('src/utils/fonts/', '../utils/fonts'), ('src/utils/coinimg/', '../utils/coinimg'), ('src/imgs/', '../imgs'), ('src/kv/', '../kv'), ('src/conf/config/', 'config'), ('src/bin/', '../bin')],
12 | hiddenimports=[],
13 | hookspath=[],
14 | hooksconfig={},
15 | runtime_hooks=[],
16 | excludes=[],
17 | win_no_prefer_redirects=False,
18 | win_private_assemblies=False,
19 | cipher=block_cipher,
20 | noarchive=False,
21 | )
22 | pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
23 |
24 | exe = EXE(
25 | pyz,
26 | a.scripts,
27 | a.binaries,
28 | a.zipfiles,
29 | a.datas,
30 | [],
31 | name='meile_gui',
32 | debug=False,
33 | bootloader_ignore_signals=False,
34 | strip=False,
35 | upx=True,
36 | upx_exclude=[],
37 | runtime_tmpdir=None,
38 | console=True,
39 | disable_windowed_traceback=False,
40 | argv_emulation=False,
41 | target_arch=None,
42 | codesign_identity=None,
43 | entitlements_file=None,
44 | )
45 |
--------------------------------------------------------------------------------
/pyinstaller.cmd:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [[ $# -lt 1 ]]; then
4 | echo "Usage: $0 "
5 | exit
6 | fi
7 |
8 | new_version="$1"
9 | build_version=`date +%s%3N`
10 |
11 | sed -i "s/VERSION = \".*\"/VERSION = \"$new_version\"/" src/typedef/konstants.py
12 | sed -i "s/BUILD = \".*\"/BUILD = \"$build_version\"/" src/typedef/konstants.py
13 |
14 | # Linux
15 | pyinstaller --onefile --collect-all bip_utils --collect-all mospy --collect-all sentinel_protobuf --collect-all sentinel_sdk --collect-all stripe --collect-all kivy_garden --add-data src/fonts:../fonts --add-data src/awoc/datum/:datum --add-data src/utils/fonts/:../utils/fonts --add-data src/utils/coinimg/:../utils/coinimg --add-data src/imgs/:../imgs --add-data src/kv/:../kv --add-data src/conf/config/:config --add-data src/bin/:../bin src/main/meile_gui.py
16 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | altgraph==0.17.3
2 | anyio==4.3.0
3 | argon2-cffi==23.1.0
4 | argon2-cffi-bindings==21.2.0
5 | asn1crypto==1.5.1
6 | attrs==23.1.0
7 | bcrypt==4.1.2
8 | bech32==1.2.0
9 | bip-utils==2.9.0
10 | blspy==2.0.2
11 | btcpay==1.0.3
12 | cachetools==5.3.1
13 | cbor2==5.4.6
14 | certifi==2022.9.24
15 | cffi==1.15.1
16 | charset-normalizer==2.1.1
17 | click==8.1.7
18 | coincurve==17.0.0
19 | cosmospy_protobuf==0.4.0
20 | crcmod==1.7
21 | cryptography==42.0.5
22 | dnspython==2.3.0
23 | docutils==0.19
24 | ecdsa==0.18.0
25 | ed25519-blake2b==1.4
26 | exceptiongroup==1.2.0
27 | future==0.18.2
28 | google-api-core==2.11.1
29 | google-api-python-client==2.92.0
30 | google-auth==2.21.0
31 | google-auth-httplib2==0.1.0
32 | googleapis-common-protos==1.59.1
33 | grpcio==1.62.1
34 | h11==0.14.0
35 | hdwallets==0.1.2
36 | httpcore==1.0.4
37 | httplib2==0.22.0
38 | httpx==0.27.0
39 | idna==3.4
40 | importlib_metadata==7.0.2
41 | jaraco.classes==3.3.1
42 | jeepney==0.8.0
43 | jsonschema==4.18.0
44 | jsonschema-specifications==2023.6.1
45 | jwcrypto==1.5.6
46 | keyring==24.3.1
47 | keyrings.cryptfile==1.3.9
48 | Kivy==2.2.1
49 | Kivy-Garden==0.1.5
50 | kivy-garden.mapview==1.0.6
51 | kivymd==1.1.1
52 | kivyoav==0.42
53 | mapview==1.0.6
54 | mnemonic==0.21
55 | more-itertools==10.2.0
56 | mospy-wallet==0.6.0
57 | pexpect==4.8.0
58 | Pillow==9.2.0
59 | protobuf==4.23.4
60 | psutil==5.9.4
61 | ptyprocess==0.7.0
62 | py-sr25519-bindings==0.2.0
63 | pyasn1==0.5.0
64 | pyasn1-modules==0.3.0
65 | pycparser==2.21
66 | pycryptodome==3.18.0
67 | pydash==5.1.1
68 | Pygments==2.13.0
69 | pyinstaller==5.5
70 | pyinstaller-hooks-contrib==2022.10
71 | PyNaCl==1.5.0
72 | pyparsing==3.1.0
73 | python-dateutil==2.8.2
74 | qrcode==7.3.1
75 | referencing==0.29.1
76 | requests==2.28.1
77 | rpds-py==0.8.10
78 | rsa==4.9
79 | safe-pysha3==1.0.4
80 | screeninfo==0.8.1
81 | SecretStorage==3.3.3
82 | sentinel-sdk==0.0.5
83 | sentinel_protobuf==0.3.3
84 | six==1.16.0
85 | sniffio==1.3.1
86 | stripe==4.2.0
87 | toml==0.10.2
88 | treelib==1.6.1
89 | typing_extensions==4.10.0
90 | Unidecode==1.3.6
91 | uritemplate==4.1.1
92 | urllib3==1.26.12
93 | zipp==3.18.1
94 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | from setuptools import setup, find_packages
4 |
5 |
6 | with open("README.md", encoding="utf-8") as f:
7 | readme = f.read()
8 |
9 | setup(
10 | name="meile-gui",
11 | version="0.13.3.0",
12 | description="Meile dVPN powered by the Sentinel Network",
13 | long_description=readme,
14 | long_description_content_type="text/markdown",
15 | author="MathNodes",
16 | author_email="freQniK@mathnodes.com",
17 | url="https://meile.app",
18 | license="GNU General Public License (GPL)",
19 | keywords="vpn, dvpn, sentinel, crypto, gui, privacy, security, decentralized ",
20 | classifiers=[
21 | "Development Status :: 4 - Beta",
22 | "Programming Language :: Python",
23 | "Programming Language :: Python :: 3.10",
24 | "License :: OSI Approved :: GNU General Public License (GPL)",
25 | "Environment :: X11 Applications",
26 | "Environment :: MacOS X",
27 | "Intended Audience :: Information Technology",
28 | "Natural Language :: English",
29 | "Operating System :: MacOS",
30 | "Operating System :: POSIX",
31 | "Programming Language :: Python :: 3.10",
32 | "Topic :: System :: Networking",
33 | "Topic :: Internet",
34 | ],
35 | package_dir={"": "src"},
36 | packages=find_packages(where="src"),
37 | install_requires=[
38 | "kivymd",
39 | "pydash",
40 | "treelib",
41 | "kivyoav",
42 | "pexpect",
43 | "qrcode",
44 | "save_thread_result",
45 | "screeninfo",
46 | "mapview",
47 | "psutil",
48 | "unidecode",
49 | "dnspython",
50 | "bip_utils",
51 | "toml",
52 |
53 | # "cosmpy", # Replaced by sentinel-python-sdk + mospy
54 |
55 | # "sentinel_protobuf==0.3.1",
56 | # The conflict is caused by:
57 | # meile-gui 0.13.3.0 depends on sentinel_protobuf==0.3.1
58 | # sentinel-sdk 0.0.1 depends on sentinel-protobuf==0.3.3
59 |
60 | "keyrings.cryptfile",
61 | "mnemonic",
62 | "bech32",
63 | "pywgkey",
64 | "sentinel-sdk",
65 | "bcrypt",
66 | "jwcrypto"
67 | ],
68 | package_data={
69 | "conf": ["config/config.ini", "config/dnscrypt-proxy.toml"],
70 | "bin": ["sentinelcli", "warp-cli", "warp-svc", "tun2socks", "v2ray"],
71 | "awoc": ["data/world.json"],
72 | "fonts": ["Roboto-BoldItalic.ttf", "arial-unicode-ms.ttf", "mplus-2c-bold.ttf"],
73 | "imgs": ["*.png", "tenor.gif", "flags/*.png"],
74 | "kv": ["meile.kv"],
75 | "main": ["icon.png"],
76 | "utils": ["coinimg/dvpn.png", "fonts/Roboto-BoldItalic.ttf"],
77 | },
78 | entry_points={
79 | "console_scripts": ["meile-gui = main.meile_gui:main"],
80 | },
81 | )
82 |
--------------------------------------------------------------------------------
/src/adapters/ChangeDNS.py:
--------------------------------------------------------------------------------
1 | import platform
2 | import re
3 | import psutil
4 | from os import path, chdir
5 | from subprocess import Popen, TimeoutExpired, PIPE
6 | from conf.meile_config import MeileGuiConfig
7 |
8 |
9 | class ChangeDNS:
10 | def __init__(self, dns: str = "1.1.1.1"):
11 | self.dns = dns
12 |
13 | def change_dns(self):
14 | MeileConfig = MeileGuiConfig()
15 | pltfrm = platform.system()
16 |
17 | if pltfrm == "Linux":
18 | resolv_file = path.join(MeileConfig.BASEDIR, "dns")
19 | dns_file = open(resolv_file, "w")
20 |
21 | dns_file.write(f"nameserver {self.dns}")
22 | dns_file.flush()
23 | dns_file.close()
24 |
25 | cmd = (
26 | "pkexec bash -c 'cat %s | resolvconf -a wg99 && resolvconf -u'"
27 | % resolv_file
28 | )
29 |
30 | try:
31 | proc = Popen(cmd, shell=True)
32 | proc.wait(timeout=60)
33 | except TimeoutExpired as e:
34 | print(str(e))
35 |
36 | proc_out, proc_err = proc.communicate()
37 |
38 | elif pltfrm == "Darwin":
39 | # sudo /usr/sbin/networksetup -listnetworkserviceorder
40 | # sudo /usr/sbin/networksetup -setdnsservers Wi-Fi 1.1.1.1
41 |
42 | # I don't know if we need some privileged permission pkexec(?)
43 | osx_interface = "^\([*0-9)]+\)"
44 | cmd = "/usr/sbin/networksetup -listnetworkserviceorder"
45 | try:
46 | proc = Popen(cmd, shell=True, stdout=PIPE)
47 | proc.wait(timeout=60)
48 | proc_out, proc_err = proc.communicate()
49 |
50 | parts = proc_out.decode("utf-8").split("\n")
51 | for p in parts:
52 | if re.search(osx_interface, p) != None: # Founded a interface
53 | interface = re.sub(osx_interface, "", p).strip()
54 | if p.startswith("(*)") is False:
55 | # print(f"{interface} is enabled")
56 | cmd = f"/usr/sbin/networksetup -setdnsservers {interface} {self.dns}"
57 | try:
58 | proc = Popen(cmd, shell=True)
59 | proc.wait(timeout=60)
60 | except TimeoutExpired as e:
61 | print(f"Exception on interface: {interface}, {e}")
62 | except TimeoutExpired as e:
63 | print(str(e))
64 |
65 | elif pltfrm == "Windows":
66 | gsudo = path.join(MeileConfig.BASEBINDIR, "gsudo.exe")
67 |
68 | """
69 | cmd = "netsh interface ip show config"
70 | proc = Popen(cmd, shell=True, stdout=PIPE)
71 | proc.wait(timeout=60)
72 | proc_out, proc_err = proc.communicate()
73 | """
74 |
75 | for interface in psutil.net_if_addrs().keys():
76 | # Filter interface, tun(nnel) or w(ire)g(uard)99
77 | if "tun" in interface.lower() or "wg99" in interface.lower():
78 | cmd = [
79 | gsudo,
80 | f'netsh interface ipv4 set dns name="{interface}" static {self.dns}',
81 | ]
82 | chdir(MeileConfig.BASEBINDIR)
83 | try:
84 | proc = Popen(cmd, shell=True)
85 | proc.wait(timeout=60)
86 | except TimeoutExpired as e:
87 | print(str(e))
88 | proc_out, proc_err = proc.communicate()
89 | chdir(MeileConfig.BASEDIR)
90 |
--------------------------------------------------------------------------------
/src/adapters/DNSCryptproxy.py:
--------------------------------------------------------------------------------
1 | import subprocess
2 | from typedef.konstants import Arch, ConfParams
3 | from os import chdir, path
4 | import platform
5 | import multiprocessing
6 | from multiprocessing import Process
7 | from time import sleep
8 |
9 | class HandleDNSCryptProxy():
10 | dnscrypt_start = """
11 | $dnscrypt_proxy_executable = "%s"
12 | $dnscrypt_proxy_config = "%s"
13 |
14 | Start-Process -FilePath $dnscrypt_proxy_executable -ArgumentList "-config `"$dnscrypt_proxy_config`"" -NoNewWindow -Wait
15 | """
16 | dnscrypt_stop = 'Stop-Process -Name "dnscrypt-proxy" -Force'
17 |
18 | dns_ps1 = """$interfaces = Get-NetAdapter | Where-Object { $_.Status -eq 'Up' }
19 | foreach ($interface in $interfaces) {
20 | Set-DnsClientServerAddress -InterfaceIndex $interface.ifIndex -ServerAddresses %s
21 | Set-DnsClientServerAddress -InterfaceIndex $interface.ifIndex -ServerAddresses %s
22 | }
23 |
24 | Get-DnsClientServerAddress
25 | """
26 | lh = "127.0.0.1"
27 | lhv6 = "::1"
28 | cf = "1.1.1.1"
29 | cfv6 = "2606:4700:4700::1111"
30 | dnscrypt_pid = 0
31 | dnscryptcmd = None
32 |
33 | def __init__(self, default: str = "1.1.1.1", defaultv6: str = "2606:4700:4700::1111"):
34 | self.default = default
35 | self.defaultv6 = defaultv6
36 | pass
37 |
38 | def fork_dnscrypt(self):
39 | pltfrm = platform.system()
40 |
41 | if pltfrm == Arch.WINDOWS:
42 | dnscryptcmd = f"gsudo.exe powershell.exe {self.dnscryptcmd}"
43 | else:
44 | dnscryptcmd = f"{self.dnscryptcmd}"
45 |
46 | process = subprocess.Popen(dnscryptcmd, shell=True,close_fds=True)
47 | print(f"DNSCryptProxy: {process.pid}")
48 | self.dnscrypt_pid = process.pid
49 |
50 | # Be sure to run in thread or concurent.futures
51 | def dnscrypt(self, state: bool = False):
52 | chdir(ConfParams.BASEBINDIR)
53 | pltfrm = platform.system()
54 | if state == True:
55 | if pltfrm == Arch.WINDOWS:
56 | dnscrypt_proxy_executable = path.join(ConfParams.BASEBINDIR, 'dnscrypt-proxy.exe')
57 | dnscrypt_proxy_config = path.join(ConfParams.KEYRINGDIR, 'dnscrypt-proxy.toml')
58 | dnscrypt_start = self.dnscrypt_start % (dnscrypt_proxy_executable, dnscrypt_proxy_config)
59 | dns_bat = self.dns_ps1 % (self.lh, self.lhv6)
60 | print(dns_bat)
61 | print(dnscrypt_start)
62 | #dnscryptcmd = f'"{dnscrypt_proxy_executable}" -config "{dnscrypt_proxy_config}"'
63 | with open("change_dns.ps1", "w") as DNSFILE:
64 | DNSFILE.write(f"{dns_bat}\n")
65 | DNSFILE.write(f"{dnscrypt_start}")
66 |
67 |
68 | print("Startin DNScrypt-proxy...", end=' ')
69 | self.dnscryptcmd = path.join(ConfParams.BASEBINDIR, "change_dns.ps1")
70 | multiprocessing.get_context('spawn')
71 | fork = Process(target=self.fork_dnscrypt)
72 | fork.run()
73 | sleep(1.5)
74 |
75 | elif pltfrm == Arch.OSX:
76 | dnscrypt_proxy_executable = path.join(ConfParams.BASEBINDIR, 'dnscrypt.sh')
77 | dnscrypt_start = dnscrypt_proxy_executable + " up"
78 | print("Startin DNScrypt-proxy...", end=' ')
79 | self.dnscryptcmd = f"{dnscrypt_start}"
80 | multiprocessing.get_context('spawn')
81 | fork = Process(target=self.fork_dnscrypt)
82 | fork.run()
83 | sleep(10)
84 |
85 | else:
86 | dnscrypt_proxy_executable = path.join(ConfParams.BASEBINDIR, 'run_dnscrypt.sh')
87 | dnscrypt_start = dnscrypt_proxy_executable + " up"
88 | print("Startin DNScrypt-proxy...", end=' ')
89 | self.dnscryptcmd = f"pkexec sh -c '{dnscrypt_start}'"
90 | multiprocessing.get_context('spawn')
91 | fork = Process(target=self.fork_dnscrypt)
92 | fork.run()
93 | sleep(1.5)
94 |
95 |
96 |
97 | else:
98 | if pltfrm == Arch.WINDOWS:
99 | kill_dns_crypt = "change_dns.ps1"
100 | if self.default != self.cf:
101 | dns_bat = self.dns_ps1 % (self.default, self.defaultv6)
102 | else:
103 | dns_bat = self.dns_ps1 % (self.cf, self.cfv6)
104 | with open(kill_dns_crypt, "w") as DNSFILE:
105 | DNSFILE.write(f"{dns_bat}\n")
106 | DNSFILE.write(f"{self.dnscrypt_stop}")
107 |
108 |
109 | print(dns_bat)
110 | print(self.dnscrypt_stop)
111 | print("Killing dnscrypt-proxy.exe...")
112 | self.dnscryptcmd = path.join(ConfParams.BASEBINDIR, "change_dns.ps1")
113 | end_daemon_cmd = [ConfParams.GSUDO, "powershell.exe", self.dnscryptcmd]
114 | proc2 = subprocess.Popen(end_daemon_cmd, shell=True)
115 | proc2.wait(timeout=30)
116 | proc_out,proc_err = proc2.communicate()
117 |
118 | #dnscmd = [ConfParams.GSUDO, path.join(ConfParams.BASEBINDIR, "change_dns.bat")]
119 | #process = subprocess.Popen(dnscmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
120 | self.dnscrypt_pid = 0
121 |
122 | elif pltfrm == Arch.OSX:
123 | dnscrypt_proxy_executable = path.join(ConfParams.BASEBINDIR, 'dnscrypt.sh')
124 | dnscrypt_start = dnscrypt_proxy_executable + " down"
125 | print("Stopping DNScrypt-proxy...", end=' ')
126 | self.dnscryptcmd = f"{dnscrypt_start}"
127 | multiprocessing.get_context('spawn')
128 | fork = Process(target=self.fork_dnscrypt)
129 | fork.run()
130 | sleep(10)
131 |
132 | else:
133 | dnscrypt_proxy_executable = path.join(ConfParams.BASEBINDIR, 'run_dnscrypt.sh')
134 | dnscrypt_start = dnscrypt_proxy_executable + " down"
135 | print("Stopping DNScrypt-proxy...", end=' ')
136 | self.dnscryptcmd = f"pkexec sh -c '{dnscrypt_start}'"
137 | multiprocessing.get_context('spawn')
138 | fork = Process(target=self.fork_dnscrypt)
139 | fork.run()
140 | sleep(1.5)
141 | # TODO: OS/X
142 |
143 | chdir(ConfParams.KEYRINGDIR)
144 |
145 |
146 |
--------------------------------------------------------------------------------
/src/adapters/DNSRequests.py:
--------------------------------------------------------------------------------
1 | from dns import resolver
2 | from dns.resolver import LifetimeTimeout
3 |
4 | # DNS Adapter to get IP address in specified timeout/lifetime request
5 | class MakeDNSRequest():
6 |
7 | def __init__(self, domain, timeout, lifetime, **kwargs):
8 | self.resolver = resolver.Resolver()
9 | self.resolver.timeout = timeout
10 | self.resolver.lifetime = lifetime
11 | self.domain = domain
12 |
13 | def DNSRequest(self):
14 | try:
15 | query = self.resolver.resolve(self.domain, 'A')
16 | return query[0].to_text()
17 | except LifetimeTimeout:
18 | return False
--------------------------------------------------------------------------------
/src/adapters/HTTPRequests.py:
--------------------------------------------------------------------------------
1 | import requests
2 | from requests.packages.urllib3.util.retry import Retry
3 | from urllib3.exceptions import InsecureRequestWarning
4 | from requests.adapters import HTTPAdapter
5 |
6 | DEFAULT_TIMEOUT = 5 # seconds
7 |
8 | class TimeoutHTTPAdapter(HTTPAdapter):
9 | def __init__(self, *args, **kwargs):
10 | self.timeout = kwargs.pop("timeout", DEFAULT_TIMEOUT)
11 | super().__init__(*args, **kwargs)
12 |
13 | def send(self, request, **kwargs):
14 | kwargs["timeout"] = kwargs.get("timeout", self.timeout)
15 | return super().send(request, **kwargs)
16 |
17 |
18 |
19 | class MakeRequest():
20 | def __init__(self, TIMEOUT=DEFAULT_TIMEOUT, headers=None):
21 | self.headers = headers
22 | self.timeout = TIMEOUT
23 | def hadapter(self):
24 | # https://github.com/Tkd-Alex/meile-gui/commit/de3c263c755e7c81e2b72b9ca15d05ad0b92b5f1
25 | # https://github.com/urllib3/urllib3/blob/main/CHANGES.rst#1260-2020-11-10
26 | # method_whitelist deprecated
27 |
28 | # We could check the version if urllib3 but I don't want to do another import.
29 |
30 | if 'DEFAULT_METHOD_WHITELIST' in dir(Retry):
31 | retries = Retry(
32 | total=2,
33 | status_forcelist=[429, 500, 502, 503, 504],
34 | method_whitelist=["HEAD", "GET", "OPTIONS"]
35 | )
36 | else:
37 | # We are on >1.26.0 version, with allowed_methods (Retry.DEFAULT_ALLOWED_METHODS)
38 | retries = Retry(
39 | total=2,
40 | status_forcelist=[429, 500, 502, 503, 504],
41 | allowed_methods=["HEAD", "GET", "OPTIONS"]
42 | )
43 |
44 | # adapter = HTTPAdapter(max_retries=retries)
45 | requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
46 | http = requests.Session()
47 | http.headers.update(self.headers or {})
48 | http.mount("http://", TimeoutHTTPAdapter(max_retries=retries, timeout=self.timeout))
49 | http.mount("https://", TimeoutHTTPAdapter(max_retries=retries, timeout=self.timeout))
50 | return http
--------------------------------------------------------------------------------
/src/adapters/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/adapters/__init__.py
--------------------------------------------------------------------------------
/src/bin/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/bin/__init__.py
--------------------------------------------------------------------------------
/src/bin/dnscrypt-proxy:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/bin/dnscrypt-proxy
--------------------------------------------------------------------------------
/src/bin/routes.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | STATE="$1"
4 | GATEWAY=`route -n | grep 'UG[ \t]' | awk '{print $2}' | tail -1 | tr -d '\n'`
5 | PRIMARY_IFACE=`route | grep '^default' | grep -o '[^ ]*$'`
6 |
7 | if test -z "$SUDO_USER"
8 | then
9 | USER=$(getent passwd $PKEXEC_UID | cut -d: -f1)
10 | else
11 | USER=$SUDO_USER
12 | fi
13 |
14 |
15 | if [[ ${STATE} = "up" ]]; then
16 |
17 | # save default route iface and gw ip
18 | echo ${GATEWAY} > /home/${USER}/.meile-gui/gateway
19 | echo ${PRIMARY_IFACE} > /home/${USER}/.meile-gui/iface
20 |
21 | # start v2ray
22 | echo "Running v2ray: /home/${USER}/.meile-gui/bin/v2ray run -c /home/${USER}/.meile-gui/v2ray_config.json &"
23 | /home/${USER}/.meile-gui/bin/v2ray run -c /home/${USER}/.meile-gui/v2ray_config.json &
24 | sleep 3
25 |
26 | # get v2ray proxy IP
27 | PROXY_IP=`cat /home/${USER}/.meile-gui/v2ray.proxy`
28 | #echo ${PROXY_IP} > /home/${USER}/.meile-gui/v2ray.proxy
29 | echo ${PROXY_IP}
30 | sleep 2
31 |
32 | # add tun interface
33 | TUNID=${RANDOM}
34 | TUNIFACE="tun"${TUNID}
35 | echo ${TUNIFACE} > /home/${USER}/.meile-gui/tuniface
36 |
37 | echo "Routing Table: "
38 | ip route show
39 |
40 | echo "Adding tun interface..."
41 | echo "ip tuntap add mode tun dev ${TUNIFACE}"
42 | ip tuntap add mode tun dev ${TUNIFACE}
43 | echo "ip addr add 10.10.10.10/24 dev ${TUNIFACE}"
44 | ip addr add 10.10.10.10/24 dev ${TUNIFACE}
45 | echo "ip link set dev ${TUNIFACE} up"
46 | ip link set dev ${TUNIFACE} up
47 |
48 | # add default route for tun
49 | echo "Adding default route for tun..."
50 | echo "ip route add default via 10.10.10.10 dev ${TUNIFACE} metric 1"
51 | ip route add default via 10.10.10.10 dev ${TUNIFACE} metric 1
52 |
53 | # add normal route for proxy IP
54 | echo "Add normal route for proxy..."
55 | echo "ip route add ${PROXY_IP} via ${GATEWAY} metric 1"
56 | ip route add ${PROXY_IP} via ${GATEWAY} metric 1
57 |
58 | # start tun2socks
59 | echo "Starting tun2socks..."
60 | /home/${USER}/.meile-gui/bin/tun2socks -device tun://${TUNIFACE} -proxy socks5://127.0.0.1:1080 -interface ${PRIMARY_IFACE} -mtu 1500 -tcp-sndbuf 1024k -tcp-rcvbuf 1024k -tcp-auto-tuning -loglevel silent > /dev/null 2>&1 &
61 |
62 | #tun2socks -device tun0 -proxy socks5://127.0.0.1:1080 -interface ${PRIMARY_IFACE} -loglevel debug &
63 | # sanity check
64 | echo "Routing table: "
65 | ip route show
66 |
67 | sleep 3
68 | echo "-----------------------_CURLING_---------------------------"
69 | curl https://icanhazip.com
70 | else
71 |
72 | # get config
73 | GATEWAY=`cat /home/${USER}/.meile-gui/gateway | cut -d " " -f 1`
74 | PRIMARY_IFACE=`cat /home/${USER}/.meile-gui/iface | cut -d " " -f 1`
75 | TUNIFACE=`cat /home/${USER}/.meile-gui/tuniface | cut -d " " -f 1`
76 | PROXY_IP=`cat /home/${USER}/.meile-gui/v2ray.proxy`
77 |
78 | # terminate the v2ray setup
79 | pkill -9 tun2socks
80 | pkill -9 v2ray
81 | sleep 5
82 |
83 | # bring down tun interface
84 | ip addr del 10.10.10.10/24 dev ${TUNIFACE}
85 | ip link set dev ${TUNIFACE} down
86 | ip tuntap del mode tun dev ${TUNIFACE}
87 |
88 | # delete routes
89 | ip route del default
90 | ip route del default via 10.10.10.10 dev ${TUNIFACE} metric 1
91 | ip route del ${PROXY_IP} via ${GATEWAY} metric 1
92 |
93 | # add default route to LAN gateway & DNS
94 | ip route add default via ${GATEWAY} dev ${PRIMARY_IFACE} metric 100
95 |
96 | # sanity check
97 | curl https://icanhazip.com
98 | fi
99 |
--------------------------------------------------------------------------------
/src/bin/run_dnscrypt.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [[ "${1^^}" == "UP" ]]; then
4 | DNS_SERVER="127.0.0.1"
5 | else
6 | DNS_SERVER="1.1.1.1"
7 | fi
8 |
9 | for interface in $(resolvectl status | grep "Link" | awk '{print $2}'); do
10 | resolvectl dns "$interface" $DNS_SERVER
11 | done
12 |
13 | resolvectl status
14 |
15 |
16 | if [[ "${1^^}" == "UP" ]]; then
17 | echo "Setting up dnscrypt-proxy..."
18 | /home/${USER}/.meile-gui/bin/dnscrypt-proxy -config /home/${USER}/.meile-gui/dnscrypt-proxy.toml &
19 |
20 | else
21 | echo "Stopping dnscrypt-proxy..."
22 | pkill -11 dnscrypt-proxy
23 | fi
24 |
25 |
--------------------------------------------------------------------------------
/src/bin/tun2socks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/bin/tun2socks
--------------------------------------------------------------------------------
/src/bin/v2ray:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/bin/v2ray
--------------------------------------------------------------------------------
/src/bin/warp-cli:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/bin/warp-cli
--------------------------------------------------------------------------------
/src/bin/warp-svc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/bin/warp-svc
--------------------------------------------------------------------------------
/src/cli/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/cli/__init__.py
--------------------------------------------------------------------------------
/src/cli/btcpay.py:
--------------------------------------------------------------------------------
1 | from btcpay import BTCPayClient
2 | import pickle
3 | from os import path,environ
4 | from time import sleep
5 | import sys
6 | from requests.auth import HTTPBasicAuth
7 |
8 | from adapters import HTTPRequests
9 | from fiat.stripe_pay.dist import scrtsxx
10 | from conf.meile_config import MeileGuiConfig
11 | from typedef.konstants import HTTParams
12 |
13 | class BTCPayDB():
14 |
15 | def connDB(self):
16 | '''
17 | db = pymysql.connect(host=scrtsxx.HOST,
18 | port=scrtsxx.PORT,
19 | user=scrtsxx.USERNAME,
20 | passwd=scrtsxx.PASSWORD,
21 | db=scrtsxx.DB,
22 | charset="utf8mb4",
23 | cursorclass=pymysql.cursors.DictCursor
24 | )
25 |
26 | return db
27 | '''
28 | return None
29 |
30 | '''
31 | def get_btcpay_client(self, db):
32 | c = db.cursor()
33 |
34 | query = "SELECT btcpay_client FROM btcpay;"
35 | c.execute(query)
36 |
37 | return c.fetchone()['btcpay_client']
38 |
39 | '''
40 | def get_remote_btcpay_client(self):
41 | MeileConfig = MeileGuiConfig()
42 | CONFIG = MeileConfig.read_configuration(MeileGuiConfig.CONFFILE)
43 | MNAPI = CONFIG['network'].get('mnapi', HTTParams.SERVER_URL)
44 | SERVER_ADDRESS = scrtsxx.SERVER_ADDRESS if "aimokoivunen" in scrtsxx.SERVER_ADDRESS else MNAPI
45 | API = scrtsxx.BTCPAY_ENDPOINT
46 | USERNAME = scrtsxx.USERNAME
47 | PASSWORD = scrtsxx.PASSWORD
48 | Request = HTTPRequests.MakeRequest()
49 | http = Request.hadapter()
50 | try:
51 | btcpayload = http.get(SERVER_ADDRESS + API, auth=HTTPBasicAuth(USERNAME, PASSWORD))
52 | except:
53 | print("ERR0R")
54 | return None
55 |
56 | return btcpayload.content
57 |
58 |
59 | def pickle_btc_client(self, obj):
60 |
61 | if path.isfile(path.join(CACHEDIR, BTCPAYOBJ)):
62 | raise FileExistsError
63 | return
64 | with open(path.join(CACHEDIR, BTCPAYOBJ), 'wb') as btcpay_client:
65 | pickle.dump(obj,btcpay_client)
66 |
67 | def unpickle_btc_client(self, obj):
68 | return pickle.loads(obj)
69 |
--------------------------------------------------------------------------------
/src/cli/v2ray.py:
--------------------------------------------------------------------------------
1 | from subprocess import Popen
2 | import multiprocessing
3 | from multiprocessing import Process
4 | from time import sleep
5 | from dataclasses import dataclass
6 | import psutil
7 |
8 | from typedef.konstants import ConfParams
9 | from conf.meile_config import MeileGuiConfig
10 |
11 | class V2RayHandler():
12 | v2ray_script = None
13 | v2ray_pid = None
14 |
15 | def __init__(self, script, **kwargs):
16 | self.v2ray_script = script
17 | print(self.v2ray_script)
18 |
19 | def fork_v2ray(self):
20 | v2ray_daemon_cmd = 'pkexec env PATH=%s %s' %(ConfParams.PATH, self.v2ray_script)
21 | v2ray_srvc_proc = Popen(v2ray_daemon_cmd, shell=True,close_fds=True)
22 |
23 | print("PID: %s" % v2ray_srvc_proc.pid)
24 |
25 | self.v2ray_pid = v2ray_srvc_proc.pid
26 |
27 |
28 | def start_daemon(self):
29 |
30 | print("Starting v2ray service...")
31 |
32 | multiprocessing.get_context('fork')
33 | warp_fork = Process(target=self.fork_v2ray)
34 | warp_fork.run()
35 | sleep(1.5)
36 | return True
37 |
38 | def kill_daemon(self):
39 | v2ray_daemon_cmd = 'pkexec env PATH=%s %s' %(ConfParams.PATH, self.v2ray_script)
40 | proc2 = Popen(v2ray_daemon_cmd, shell=True)
41 | proc2.wait(timeout=30)
42 | proc_out,proc_err = proc2.communicate()
43 | return proc2.returncode
44 |
45 |
46 |
47 | @dataclass
48 | class V2RayConfiguration:
49 | api_port: int
50 |
51 | vmess_port: int
52 | vmess_address: str
53 | vmess_uid: str
54 | vmess_transport: str
55 |
56 | proxy_port: int = 1080
57 |
58 | def get(self) -> dict:
59 | return {
60 | "api": {
61 | "services": [
62 | "StatsService"
63 | ],
64 | "tag": "api"
65 | },
66 | "inbounds": [
67 | {
68 | "listen": "127.0.0.1",
69 | "port": self.api_port,
70 | "protocol": "dokodemo-door",
71 | "settings": {
72 | "address": "127.0.0.1"
73 | },
74 | "tag": "api"
75 | },
76 | {
77 | "listen": "127.0.0.1",
78 | "port": self.proxy_port,
79 | "protocol": "socks",
80 | "settings": {
81 | "ip": "127.0.0.1",
82 | "udp": True
83 | },
84 | "sniffing": {
85 | "destOverride": [
86 | "http",
87 | "tls"
88 | ],
89 | "enabled": True
90 | },
91 | "tag": "proxy"
92 | }
93 | ],
94 | "log": {
95 | "loglevel": "none"
96 | },
97 | "outbounds": [
98 | {
99 | "protocol": "vmess",
100 | "settings": {
101 | "vnext": [
102 | {
103 | "address": self.vmess_address,
104 | "port": self.vmess_port,
105 | "users": [
106 | {
107 | "alterId": 0,
108 | "id": self.vmess_uid
109 | }
110 | ]
111 | }
112 | ]
113 | },
114 | "streamSettings": {
115 | "network": self.vmess_transport
116 | },
117 | "tag": "vmess"
118 | }
119 | ],
120 | "policy": {
121 | "levels": {
122 | "0": {
123 | "downlinkOnly": 0,
124 | "uplinkOnly": 0
125 | }
126 | },
127 | "system": {
128 | "statsOutboundDownlink": True,
129 | "statsOutboundUplink": True
130 | }
131 | },
132 | "routing": {
133 | "rules": [
134 | {
135 | "inboundTag": [
136 | "api"
137 | ],
138 | "outboundTag": "api",
139 | "type": "field"
140 | }
141 | ]
142 | },
143 | "stats": {},
144 | "transport": {
145 | "dsSettings": {},
146 | "grpcSettings": {},
147 | "gunSettings": {},
148 | "httpSettings": {},
149 | "kcpSettings": {},
150 | "quicSettings": {
151 | "security": "chacha20-poly1305"
152 | },
153 | "tcpSettings": {},
154 | "wsSettings": {}
155 | }
156 | }
--------------------------------------------------------------------------------
/src/cli/warp.py:
--------------------------------------------------------------------------------
1 |
2 | from subprocess import Popen
3 | from conf.meile_config import MeileGuiConfig
4 | import multiprocessing
5 | from multiprocessing import Process
6 | from time import sleep
7 | class WarpHandler():
8 | warp_daemon = None
9 | warp_cli = None
10 |
11 | def __init__(self, **kwargs):
12 | MeileConfig = MeileGuiConfig()
13 | self.warp_daemon = MeileConfig.resource_path("../bin/warp-svc")
14 | self.warp_cli = MeileConfig.resource_path("../bin/warp-cli")
15 |
16 | def fork_warp(self):
17 | warp_daemon_cmd = "pkexec %s" % self.warp_daemon
18 | warp_srvc_proc = Popen(warp_daemon_cmd, shell=True,close_fds=True)
19 |
20 |
21 |
22 | def start_warp_daemon(self):
23 |
24 | print("Starting WARP service...")
25 |
26 | multiprocessing.get_context('fork')
27 | warp_fork = Process(target=self.fork_warp)
28 | warp_fork.run()
29 | sleep(7)
30 | return True
31 |
32 |
33 | def register_warp(self):
34 | warp_cli_register_cmd = "%s --accept-tos register" % self.warp_cli
35 | proc = Popen(warp_cli_register_cmd, shell=True)
36 |
37 | proc.wait(timeout=20)
38 |
39 | if proc.returncode == 0:
40 | print("Successfully Registered WARP")
41 | return True
42 | else:
43 | print("ERROR: Could not register WARP")
44 | return False
45 |
46 | def run_warp(self):
47 | warp_cli_set_doh = "%s --accept-tos set-mode doh" % self.warp_cli
48 | warp_cli_connect = "%s --accept-tos connect" % self.warp_cli
49 |
50 | doh_proc = Popen(warp_cli_set_doh, shell=True)
51 | doh_proc.wait(timeout=7)
52 |
53 | sleep(3)
54 | if doh_proc.returncode == 0:
55 | print("Successfully set DoH mode")
56 | else:
57 | print("ERROR: Could not set DoH mode")
58 | return False
59 |
60 | connect_proc = Popen(warp_cli_connect, shell=True)
61 | connect_proc.wait(timeout=7)
62 |
63 | sleep(3)
64 | if connect_proc.returncode == 0:
65 | print("Successfully connected to WARP in DoH mode")
66 | return True
67 | else:
68 | print("ERROR: Could not connect to WARP")
69 | return False
70 |
71 | def warp_disconnect(self):
72 | warp_cli_disconnect = "%s --accept-tos disconnect" % self.warp_cli
73 |
74 | wdis_proc = Popen(warp_cli_disconnect, shell=True)
75 | wdis_proc.wait(timeout=10)
76 |
77 | sleep(3)
78 | if wdis_proc.returncode == 0:
79 | print("Successfully disconnected from WARP")
80 | return True
81 | else:
82 | print("ERROR: On disconnect from WARP")
83 | return False
84 |
85 |
86 |
--------------------------------------------------------------------------------
/src/coin_api/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/coin_api/__init__.py
--------------------------------------------------------------------------------
/src/coin_api/get_price.py:
--------------------------------------------------------------------------------
1 | from adapters import HTTPRequests
2 | from typedef.konstants import IBCTokens
3 | import coin_api.scrtxxs as scrtxxs
4 | import random
5 |
6 | class GetPriceAPI():
7 | #DEC_AscenDEX = "https://ascendex.com/api/pro/v1/spot/ticker?symbol=DEC/USDT"
8 | CoinStats = "https://openapiv1.coinstats.app/coins/%s"
9 |
10 |
11 | def get_usd(self, coin):
12 | N = random.randint(0,len(scrtxxs.COINSTATS_API_KEYS)-1)
13 | API_KEY = scrtxxs.COINSTATS_API_KEYS[N]
14 | headers = {
15 | "accept": "application/json",
16 | "X-API-KEY": f"{API_KEY}"
17 | }
18 | Request = HTTPRequests.MakeRequest(headers=headers)
19 | http = Request.hadapter()
20 |
21 | for key,value in IBCTokens.CSAPPMAP.items():
22 | if coin.lower() == key:
23 | try:
24 | r = http.get(self.CoinStats % value)
25 | print(r.json())
26 | coin_price = r.json()['price']
27 | except Exception as e:
28 | print(str(e))
29 | return {'success' : False, 'price' : 0.0}
30 |
31 | return {'success' : True, 'price' : coin_price}
--------------------------------------------------------------------------------
/src/conf/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/conf/__init__.py
--------------------------------------------------------------------------------
/src/conf/config.ini:
--------------------------------------------------------------------------------
1 | [wallet]
2 | keyname =
3 | address =
4 | password =
5 | uuid =
--------------------------------------------------------------------------------
/src/conf/config/config.ini:
--------------------------------------------------------------------------------
1 | [wallet]
2 | keyname =
3 | address =
4 | password =
5 | uuid =
--------------------------------------------------------------------------------
/src/conf/meile_config.py:
--------------------------------------------------------------------------------
1 | from os import path,environ,mkdir
2 |
3 | import configparser
4 | import shutil
5 |
6 | import sys
7 |
8 |
9 | class MeileGuiConfig():
10 | USER = environ['SUDO_USER'] if 'SUDO_USER' in environ else environ['USER']
11 | BASEDIR = path.join(path.expanduser('~' + USER), '.meile-gui')
12 | BASEBINDIR = path.join(BASEDIR, 'bin')
13 | CONFFILE = path.join(BASEDIR, 'config.ini')
14 | IMGDIR = path.join(BASEDIR, 'img')
15 | CONFIG = configparser.ConfigParser()
16 |
17 | def resource_path(self, relative_path):
18 | """ Get absolute path to resource, works for dev and for PyInstaller """
19 | base_path = getattr(sys, '_MEIPASS', path.dirname(path.abspath(__file__)))
20 | return path.join(base_path, relative_path)
21 |
22 | def copy_bin_dir(self):
23 | self.copy_and_overwrite(self.resource_path("../bin"), self.BASEBINDIR)
24 |
25 | def copy_and_overwrite(self, from_path, to_path):
26 | if path.exists(to_path):
27 | shutil.rmtree(to_path)
28 | shutil.copytree(from_path, to_path)
29 |
30 | def read_configuration(self, confpath):
31 | """Read the configuration file at given path."""
32 | # copy our default config file
33 |
34 | if path.isdir(self.BASEDIR):
35 | if not path.isfile(confpath):
36 | defaultconf = self.resource_path(path.join('config', 'config.ini'))
37 | shutil.copyfile(defaultconf, self.CONFFILE)
38 |
39 | else:
40 | mkdir(self.BASEDIR)
41 | defaultconf = self.resource_path(path.join('config', 'config.ini'))
42 | shutil.copyfile(defaultconf, self.CONFFILE)
43 |
44 | if not path.isdir(self.IMGDIR):
45 | mkdir(self.IMGDIR)
46 |
47 | dnscrypt_confile = path.join(self.BASEDIR, 'dnscrypt-proxy.toml')
48 |
49 | if not path.isfile(dnscrypt_confile):
50 | dnscryptconf = self.resource_path(path.join('config', 'dnscrypt-proxy.toml'))
51 | shutil.copyfile(dnscryptconf, dnscrypt_confile)
52 |
53 |
54 | self.CONFIG.read(confpath)
55 |
56 | if not self.CONFIG.has_section('subscription'):
57 | self.CONFIG.add_section('subscription')
58 | self.CONFIG.set('subscription', 'gb', '5')
59 | FILE = open(self.CONFFILE, 'w')
60 | self.CONFIG.write(FILE)
61 |
62 | if not self.CONFIG.has_section('network'):
63 | self.CONFIG.add_section('network')
64 | self.CONFIG.set('network', 'rpc', 'https://rpc.mathnodes.com:443')
65 | self.CONFIG.set('network', 'grpc', 'grpc.ungovernable.dev:443')
66 | self.CONFIG.set('network', 'api', 'https://api.sentinel.mathnodes.com')
67 | self.CONFIG.set('network', 'mnapi', 'https://aimokoivunen.mathnodes.com')
68 | self.CONFIG.set('network', 'cache', 'https://metabase.bluefren.xyz/api/public/card/4a891454-51da-462a-a5df-e85ca17c05d5/query/json')
69 | FILE = open(self.CONFFILE, 'w')
70 | self.CONFIG.write(FILE)
71 | else:
72 | if not self.CONFIG.has_option('network', 'grpc'):
73 | self.CONFIG.set('network', 'grpc', 'grpc.ungovernable.dev:443')
74 | if not self.CONFIG.has_option('network', 'api'):
75 | self.CONFIG.set('network', 'api', 'https://api.sentinel.mathnodes.com')
76 | if not self.CONFIG.has_option('network', 'mnapi'):
77 | self.CONFIG.set('network', 'mnapi', 'https://aimokoivunen.mathnodes.com')
78 | if not self.CONFIG.has_option('network', 'cache'):
79 | self.CONFIG.set('network', 'cache', 'https://metabase.bluefren.xyz/api/public/card/4a891454-51da-462a-a5df-e85ca17c05d5/query/json')
80 | if not self.CONFIG.has_option('network', 'resolver1'):
81 | self.CONFIG.set('network', 'resolver1', 'cs-ch')
82 | if not self.CONFIG.has_option('network', 'resolver2'):
83 | self.CONFIG.set('network', 'resolver2', 'uncensoreddns-ipv4')
84 | if not self.CONFIG.has_option('network', 'resolver3'):
85 | self.CONFIG.set('network', 'resolver3', 'doh-ibksturm')
86 |
87 | FILE = open(self.CONFFILE, 'w')
88 | self.CONFIG.write(FILE)
89 |
90 |
91 | return self.CONFIG
92 |
--------------------------------------------------------------------------------
/src/fiat/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/fiat/__init__.py
--------------------------------------------------------------------------------
/src/fiat/stripe_pay/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/fiat/stripe_pay/__init__.py
--------------------------------------------------------------------------------
/src/fiat/stripe_pay/charge.py:
--------------------------------------------------------------------------------
1 | import stripe
2 | import requests
3 | import fiat.stripe_pay.scrtsxx as scrtsxx
4 |
5 | stripe.api_key=scrtsxx.SECRET_KEY
6 |
7 | IBCSCRT = 'ibc/31FEE1A2A9F9C01113F90BD0BBCCE8FD6BBB8585FAF109A2101827DD1D5B95B8'
8 | IBCATOM = 'ibc/A8C2D23A1E6F95DA4E48BA349667E322BD7A6C996D8A4AAE8BA72E190F3D1477'
9 | IBCDEC = 'ibc/B1C0DDB14F25279A2026BC8794E12B259F8BDA546A3C5132CCAEE4431CE36783'
10 | IBCOSMO = 'ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518'
11 | IBCUNKWN = 'ibc/9BCB27203424535B6230D594553F1659C77EC173E36D9CF4759E7186EE747E84'
12 |
13 | class StripePayments():
14 | def generate_card_token(self, cardnumber,expmonth,expyear,cvv):
15 | data= stripe.Token.create(
16 | card={
17 | "number": str(cardnumber),
18 | "exp_month": int(expmonth),
19 | "exp_year": int(expyear),
20 | "cvc": str(cvv),
21 | })
22 | card_token = data['id']
23 |
24 | return card_token
25 |
26 |
27 | def create_payment_charge(self, tokenid,amount):
28 |
29 | payment = stripe.Charge.create(
30 | amount= int(float(amount)*100), # convert amount to cents
31 | currency='usd',
32 | description='dVPN Credits',
33 | source=tokenid,
34 | )
35 |
36 | payment_check = payment # return True for payment
37 |
38 | return payment_check
39 |
40 |
41 | class HotwalletFuncs():
42 | def get_balance(self, address):
43 | APIURL = "https://api.sentinel.mathnodes.com"
44 | SATOSHI = 1000000
45 | endpoint = "/bank/balances/" + address
46 | CoinDict = {'dvpn' : 0, 'scrt' : 0, 'dec' : 0, 'atom' : 0, 'osmo' : 0}
47 | try:
48 | r = requests.get(APIURL + endpoint)
49 | coinJSON = r.json()
50 | except:
51 | return None
52 |
53 |
54 |
55 | #print(coinJSON)
56 | try:
57 | for coin in coinJSON['result']:
58 | if "udvpn" in coin['denom']:
59 | CoinDict['dvpn'] = round(float(float(coin['amount']) / SATOSHI),4)
60 | elif IBCSCRT in coin['denom']:
61 | CoinDict['scrt'] = round(float(float(coin['amount']) / SATOSHI),4)
62 | elif IBCDEC in coin['denom']:
63 | CoinDict['dec'] = round(float(float(coin['amount']) / SATOSHI),4)
64 | elif IBCATOM in coin['denom']:
65 | CoinDict['atom'] = round(float(float(coin['amount']) / SATOSHI),4)
66 | elif IBCOSMO in coin['denom']:
67 | CoinDict['osmo'] = round(float(float(coin['amount']) / SATOSHI),4)
68 | except Exception as e:
69 | print(str(e))
70 | return None
71 | return CoinDict
--------------------------------------------------------------------------------
/src/fonts/Roboto-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/fonts/Roboto-BoldItalic.ttf
--------------------------------------------------------------------------------
/src/fonts/mplus-2c-bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/fonts/mplus-2c-bold.ttf
--------------------------------------------------------------------------------
/src/geography/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/geography/__init__.py
--------------------------------------------------------------------------------
/src/helpers/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/helpers/__init__.py
--------------------------------------------------------------------------------
/src/helpers/bandwidth.py:
--------------------------------------------------------------------------------
1 | from datetime import timedelta, datetime
2 | import psutil
3 | import re
4 |
5 | def compute_consumed_data(consumed):
6 | if "GB" in consumed:
7 | consumed = float(consumed.replace('GB', ''))
8 | elif "MB" in consumed:
9 | consumed = float(float(consumed.replace('MB', '')) / 1024)
10 | elif "KB" in consumed:
11 | consumed = float(float(consumed.replace('KB', '')) / (1024*1024))
12 | elif "0.00B" in consumed:
13 | consumed = 0.0
14 | else:
15 | consumed = float(float(re.findall(r'[0-9]+\.[0-9]+', consumed)[0].replace('B', '')) / (1024*1024*1024))
16 |
17 | return consumed
18 |
19 |
20 | def compute_consumed_hours(allocated, expirary_date):
21 |
22 | allocated = allocated.split('hrs')[0].rstrip().lstrip()
23 | now = datetime.now()
24 | #expirary_date = datetime.strptime(expirary_date,'%b %d %Y, %I:%M %p')
25 | try:
26 | expirary_date = datetime.strptime(expirary_date,'%Y-%m-%d %H:%M:%S')
27 | except ValueError:
28 | print("Wrong datetime string...trying another")
29 | try:
30 | expirary_date = datetime.strptime(expirary_date,'%b %d %Y, %I:%M %p')
31 | except ValueError:
32 | print("Can't agree on date string... skipping")
33 | return 0
34 | sub_date = expirary_date - timedelta(hours=float(allocated))
35 | subdelta = now - sub_date
36 | remaining_hours = round(float(subdelta.total_seconds())/3600,3)
37 | consumed = float(float(allocated) - remaining_hours)
38 | if consumed < 0:
39 | consumed = 0
40 | return round(float(subdelta.total_seconds())/3600,3)
41 |
42 | '''
43 | This routine gets any currently received/sent bytes on the tunnel interface
44 | These values are used as a starting point.
45 | If a user connects to a node, disconnects, and later connects to a different node
46 | the kernel still has in cache the tx/rx bytes for the interface.
47 |
48 | So, this routine is used to pick up whatever was cached (if any)
49 | and provide a starting point for the data consumed.
50 | '''
51 | def init_GetConsumedWhileConnected():
52 | try:
53 | bytes_sent = round(float(float(psutil.net_io_counters(pernic=True)['wg99'].bytes_sent) / 1073741824),3)
54 | bytes_recvd = round(float(float(psutil.net_io_counters(pernic=True)['wg99'].bytes_recv) / 1073741824),3)
55 |
56 | return {'sent' : bytes_sent, "rcvd" : bytes_recvd}
57 | except KeyError:
58 | # Find V2Ray Tunnel (tun2socks) interface
59 | for iface in psutil.net_if_addrs().keys():
60 | if "tun" in iface:
61 | IFACE = iface
62 | print(IFACE)
63 | break
64 | try:
65 | bytes_sent = round(float(float(psutil.net_io_counters(pernic=True)[IFACE].bytes_sent) / 1073741824),3)
66 | bytes_recvd = round(float(float(psutil.net_io_counters(pernic=True)[IFACE].bytes_recv) / 1073741824),3)
67 |
68 | return {'sent' : bytes_sent, "rcvd" : bytes_recvd}
69 | except Exception as e:
70 | print(str(e))
71 | return {'sent': 0, 'rcvd' : 0}
72 |
73 | def GetConsumedWhileConnected(sConsumed, Bytes):
74 | try:
75 | bytes_sent = round(float(float(float(psutil.net_io_counters(pernic=True)['wg99'].bytes_sent) / 1073741824) - Bytes['sent']),3)
76 | bytes_recvd = round(float(float(float(psutil.net_io_counters(pernic=True)['wg99'].bytes_recv) / 1073741824) - Bytes['rcvd']),3)
77 |
78 | total_data = str(round(float(bytes_sent + bytes_recvd)+ float(sConsumed),3)) + "GB"
79 | except KeyError:
80 | for iface in psutil.net_if_addrs().keys():
81 | if "tun" in iface:
82 | IFACE = iface
83 | break
84 |
85 | try:
86 | bytes_sent = round(float(float(float(psutil.net_io_counters(pernic=True)[IFACE].bytes_sent) / 1073741824) - Bytes['sent']),3)
87 | bytes_recvd = round(float(float(float(psutil.net_io_counters(pernic=True)[IFACE].bytes_recv) / 1073741824) - Bytes['rcvd']),3)
88 |
89 | total_data = str(round(float(bytes_sent + bytes_recvd)+ float(sConsumed),3)) + "GB"
90 | except Exception as e:
91 | print(str(e))
92 | total_data = "0GB"
93 |
94 | print("Total Data: %s" % total_data, end=' ')
95 | return total_data
--------------------------------------------------------------------------------
/src/helpers/helpers.py:
--------------------------------------------------------------------------------
1 |
2 |
3 | def format_byte_size(size, decimals=2, binary_system=True):
4 | if binary_system:
5 | units = ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB"]
6 | largest_unit = "YiB"
7 | step = 1024
8 | else:
9 | units = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB"]
10 | largest_unit = "YB"
11 | step = 1000
12 | for unit in units:
13 | if size < step:
14 | return ("%." + str(decimals) + "f %s") % (size, unit)
15 | size /= step
16 | return ("%." + str(decimals) + "f %s") % (size, largest_unit)
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/helpers/wireguard.py:
--------------------------------------------------------------------------------
1 | from base64 import b64encode
2 | from nacl.public import PrivateKey
3 |
4 | class WgKey():
5 |
6 | def __init__(self):
7 | self._key = PrivateKey.generate()
8 |
9 | @property
10 | def pubkey(self) -> str:
11 | return b64encode(bytes(self._key.public_key)).decode("ascii")
12 |
13 | @property
14 | def privkey(self) -> str:
15 | return b64encode(bytes(self._key)).decode("ascii")
--------------------------------------------------------------------------------
/src/imgs/ConnectButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/ConnectButton.png
--------------------------------------------------------------------------------
/src/imgs/DisconnectButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/DisconnectButton.png
--------------------------------------------------------------------------------
/src/imgs/GetInfoButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/GetInfoButton.png
--------------------------------------------------------------------------------
/src/imgs/SubscribeButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/SubscribeButton.png
--------------------------------------------------------------------------------
/src/imgs/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/__init__.py
--------------------------------------------------------------------------------
/src/imgs/atom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/atom.png
--------------------------------------------------------------------------------
/src/imgs/dec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/dec.png
--------------------------------------------------------------------------------
/src/imgs/dvpn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/dvpn.png
--------------------------------------------------------------------------------
/src/imgs/flags/ad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ad.png
--------------------------------------------------------------------------------
/src/imgs/flags/ae.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ae.png
--------------------------------------------------------------------------------
/src/imgs/flags/af.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/af.png
--------------------------------------------------------------------------------
/src/imgs/flags/ag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ag.png
--------------------------------------------------------------------------------
/src/imgs/flags/ai.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ai.png
--------------------------------------------------------------------------------
/src/imgs/flags/al.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/al.png
--------------------------------------------------------------------------------
/src/imgs/flags/am.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/am.png
--------------------------------------------------------------------------------
/src/imgs/flags/ao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ao.png
--------------------------------------------------------------------------------
/src/imgs/flags/aq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/aq.png
--------------------------------------------------------------------------------
/src/imgs/flags/ar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ar.png
--------------------------------------------------------------------------------
/src/imgs/flags/as.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/as.png
--------------------------------------------------------------------------------
/src/imgs/flags/at.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/at.png
--------------------------------------------------------------------------------
/src/imgs/flags/au.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/au.png
--------------------------------------------------------------------------------
/src/imgs/flags/aw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/aw.png
--------------------------------------------------------------------------------
/src/imgs/flags/ax.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ax.png
--------------------------------------------------------------------------------
/src/imgs/flags/az.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/az.png
--------------------------------------------------------------------------------
/src/imgs/flags/ba.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ba.png
--------------------------------------------------------------------------------
/src/imgs/flags/bb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bb.png
--------------------------------------------------------------------------------
/src/imgs/flags/bd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bd.png
--------------------------------------------------------------------------------
/src/imgs/flags/be.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/be.png
--------------------------------------------------------------------------------
/src/imgs/flags/bf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bf.png
--------------------------------------------------------------------------------
/src/imgs/flags/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bg.png
--------------------------------------------------------------------------------
/src/imgs/flags/bh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bh.png
--------------------------------------------------------------------------------
/src/imgs/flags/bi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bi.png
--------------------------------------------------------------------------------
/src/imgs/flags/bj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bj.png
--------------------------------------------------------------------------------
/src/imgs/flags/bl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bl.png
--------------------------------------------------------------------------------
/src/imgs/flags/bm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bm.png
--------------------------------------------------------------------------------
/src/imgs/flags/bn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bn.png
--------------------------------------------------------------------------------
/src/imgs/flags/bo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bo.png
--------------------------------------------------------------------------------
/src/imgs/flags/bq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bq.png
--------------------------------------------------------------------------------
/src/imgs/flags/br.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/br.png
--------------------------------------------------------------------------------
/src/imgs/flags/bs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bs.png
--------------------------------------------------------------------------------
/src/imgs/flags/bt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bt.png
--------------------------------------------------------------------------------
/src/imgs/flags/bv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bv.png
--------------------------------------------------------------------------------
/src/imgs/flags/bw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bw.png
--------------------------------------------------------------------------------
/src/imgs/flags/by.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/by.png
--------------------------------------------------------------------------------
/src/imgs/flags/bz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/bz.png
--------------------------------------------------------------------------------
/src/imgs/flags/ca.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ca.png
--------------------------------------------------------------------------------
/src/imgs/flags/cc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cc.png
--------------------------------------------------------------------------------
/src/imgs/flags/cd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cd.png
--------------------------------------------------------------------------------
/src/imgs/flags/cf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cf.png
--------------------------------------------------------------------------------
/src/imgs/flags/cg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cg.png
--------------------------------------------------------------------------------
/src/imgs/flags/ch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ch.png
--------------------------------------------------------------------------------
/src/imgs/flags/ci.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ci.png
--------------------------------------------------------------------------------
/src/imgs/flags/ck.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ck.png
--------------------------------------------------------------------------------
/src/imgs/flags/cl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cl.png
--------------------------------------------------------------------------------
/src/imgs/flags/cm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cm.png
--------------------------------------------------------------------------------
/src/imgs/flags/cn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cn.png
--------------------------------------------------------------------------------
/src/imgs/flags/co.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/co.png
--------------------------------------------------------------------------------
/src/imgs/flags/cr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cr.png
--------------------------------------------------------------------------------
/src/imgs/flags/cu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cu.png
--------------------------------------------------------------------------------
/src/imgs/flags/cv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cv.png
--------------------------------------------------------------------------------
/src/imgs/flags/cw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cw.png
--------------------------------------------------------------------------------
/src/imgs/flags/cx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cx.png
--------------------------------------------------------------------------------
/src/imgs/flags/cy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cy.png
--------------------------------------------------------------------------------
/src/imgs/flags/cz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/cz.png
--------------------------------------------------------------------------------
/src/imgs/flags/de.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/de.png
--------------------------------------------------------------------------------
/src/imgs/flags/dj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/dj.png
--------------------------------------------------------------------------------
/src/imgs/flags/dk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/dk.png
--------------------------------------------------------------------------------
/src/imgs/flags/dm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/dm.png
--------------------------------------------------------------------------------
/src/imgs/flags/do.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/do.png
--------------------------------------------------------------------------------
/src/imgs/flags/dz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/dz.png
--------------------------------------------------------------------------------
/src/imgs/flags/ec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ec.png
--------------------------------------------------------------------------------
/src/imgs/flags/ee.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ee.png
--------------------------------------------------------------------------------
/src/imgs/flags/eg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/eg.png
--------------------------------------------------------------------------------
/src/imgs/flags/eh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/eh.png
--------------------------------------------------------------------------------
/src/imgs/flags/er.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/er.png
--------------------------------------------------------------------------------
/src/imgs/flags/es.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/es.png
--------------------------------------------------------------------------------
/src/imgs/flags/et.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/et.png
--------------------------------------------------------------------------------
/src/imgs/flags/fi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/fi.png
--------------------------------------------------------------------------------
/src/imgs/flags/fj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/fj.png
--------------------------------------------------------------------------------
/src/imgs/flags/fk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/fk.png
--------------------------------------------------------------------------------
/src/imgs/flags/fm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/fm.png
--------------------------------------------------------------------------------
/src/imgs/flags/fo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/fo.png
--------------------------------------------------------------------------------
/src/imgs/flags/fr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/fr.png
--------------------------------------------------------------------------------
/src/imgs/flags/ga.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ga.png
--------------------------------------------------------------------------------
/src/imgs/flags/gb-eng.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gb-eng.png
--------------------------------------------------------------------------------
/src/imgs/flags/gb-nir.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gb-nir.png
--------------------------------------------------------------------------------
/src/imgs/flags/gb-sct.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gb-sct.png
--------------------------------------------------------------------------------
/src/imgs/flags/gb-wls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gb-wls.png
--------------------------------------------------------------------------------
/src/imgs/flags/gb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gb.png
--------------------------------------------------------------------------------
/src/imgs/flags/gd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gd.png
--------------------------------------------------------------------------------
/src/imgs/flags/ge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ge.png
--------------------------------------------------------------------------------
/src/imgs/flags/gf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gf.png
--------------------------------------------------------------------------------
/src/imgs/flags/gg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gg.png
--------------------------------------------------------------------------------
/src/imgs/flags/gh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gh.png
--------------------------------------------------------------------------------
/src/imgs/flags/gi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gi.png
--------------------------------------------------------------------------------
/src/imgs/flags/gl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gl.png
--------------------------------------------------------------------------------
/src/imgs/flags/gm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gm.png
--------------------------------------------------------------------------------
/src/imgs/flags/gn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gn.png
--------------------------------------------------------------------------------
/src/imgs/flags/gp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gp.png
--------------------------------------------------------------------------------
/src/imgs/flags/gq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gq.png
--------------------------------------------------------------------------------
/src/imgs/flags/gr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gr.png
--------------------------------------------------------------------------------
/src/imgs/flags/gs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gs.png
--------------------------------------------------------------------------------
/src/imgs/flags/gt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gt.png
--------------------------------------------------------------------------------
/src/imgs/flags/gu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gu.png
--------------------------------------------------------------------------------
/src/imgs/flags/gw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gw.png
--------------------------------------------------------------------------------
/src/imgs/flags/gy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/gy.png
--------------------------------------------------------------------------------
/src/imgs/flags/hk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/hk.png
--------------------------------------------------------------------------------
/src/imgs/flags/hm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/hm.png
--------------------------------------------------------------------------------
/src/imgs/flags/hn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/hn.png
--------------------------------------------------------------------------------
/src/imgs/flags/hr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/hr.png
--------------------------------------------------------------------------------
/src/imgs/flags/ht.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ht.png
--------------------------------------------------------------------------------
/src/imgs/flags/hu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/hu.png
--------------------------------------------------------------------------------
/src/imgs/flags/id.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/id.png
--------------------------------------------------------------------------------
/src/imgs/flags/ie.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ie.png
--------------------------------------------------------------------------------
/src/imgs/flags/il.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/il.png
--------------------------------------------------------------------------------
/src/imgs/flags/im.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/im.png
--------------------------------------------------------------------------------
/src/imgs/flags/in.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/in.png
--------------------------------------------------------------------------------
/src/imgs/flags/io.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/io.png
--------------------------------------------------------------------------------
/src/imgs/flags/iq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/iq.png
--------------------------------------------------------------------------------
/src/imgs/flags/ir.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ir.png
--------------------------------------------------------------------------------
/src/imgs/flags/is.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/is.png
--------------------------------------------------------------------------------
/src/imgs/flags/it.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/it.png
--------------------------------------------------------------------------------
/src/imgs/flags/je.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/je.png
--------------------------------------------------------------------------------
/src/imgs/flags/jm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/jm.png
--------------------------------------------------------------------------------
/src/imgs/flags/jo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/jo.png
--------------------------------------------------------------------------------
/src/imgs/flags/jp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/jp.png
--------------------------------------------------------------------------------
/src/imgs/flags/ke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ke.png
--------------------------------------------------------------------------------
/src/imgs/flags/kg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/kg.png
--------------------------------------------------------------------------------
/src/imgs/flags/kh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/kh.png
--------------------------------------------------------------------------------
/src/imgs/flags/ki.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ki.png
--------------------------------------------------------------------------------
/src/imgs/flags/km.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/km.png
--------------------------------------------------------------------------------
/src/imgs/flags/kn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/kn.png
--------------------------------------------------------------------------------
/src/imgs/flags/kp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/kp.png
--------------------------------------------------------------------------------
/src/imgs/flags/kr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/kr.png
--------------------------------------------------------------------------------
/src/imgs/flags/kw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/kw.png
--------------------------------------------------------------------------------
/src/imgs/flags/ky.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ky.png
--------------------------------------------------------------------------------
/src/imgs/flags/kz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/kz.png
--------------------------------------------------------------------------------
/src/imgs/flags/la.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/la.png
--------------------------------------------------------------------------------
/src/imgs/flags/lb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/lb.png
--------------------------------------------------------------------------------
/src/imgs/flags/lc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/lc.png
--------------------------------------------------------------------------------
/src/imgs/flags/li.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/li.png
--------------------------------------------------------------------------------
/src/imgs/flags/lk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/lk.png
--------------------------------------------------------------------------------
/src/imgs/flags/lr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/lr.png
--------------------------------------------------------------------------------
/src/imgs/flags/ls.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ls.png
--------------------------------------------------------------------------------
/src/imgs/flags/lt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/lt.png
--------------------------------------------------------------------------------
/src/imgs/flags/lu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/lu.png
--------------------------------------------------------------------------------
/src/imgs/flags/lv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/lv.png
--------------------------------------------------------------------------------
/src/imgs/flags/ly.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ly.png
--------------------------------------------------------------------------------
/src/imgs/flags/ma.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ma.png
--------------------------------------------------------------------------------
/src/imgs/flags/mc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mc.png
--------------------------------------------------------------------------------
/src/imgs/flags/md.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/md.png
--------------------------------------------------------------------------------
/src/imgs/flags/me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/me.png
--------------------------------------------------------------------------------
/src/imgs/flags/mf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mf.png
--------------------------------------------------------------------------------
/src/imgs/flags/mg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mg.png
--------------------------------------------------------------------------------
/src/imgs/flags/mh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mh.png
--------------------------------------------------------------------------------
/src/imgs/flags/mk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mk.png
--------------------------------------------------------------------------------
/src/imgs/flags/ml.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ml.png
--------------------------------------------------------------------------------
/src/imgs/flags/mm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mm.png
--------------------------------------------------------------------------------
/src/imgs/flags/mn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mn.png
--------------------------------------------------------------------------------
/src/imgs/flags/mo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mo.png
--------------------------------------------------------------------------------
/src/imgs/flags/mp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mp.png
--------------------------------------------------------------------------------
/src/imgs/flags/mq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mq.png
--------------------------------------------------------------------------------
/src/imgs/flags/mr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mr.png
--------------------------------------------------------------------------------
/src/imgs/flags/ms.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ms.png
--------------------------------------------------------------------------------
/src/imgs/flags/mt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mt.png
--------------------------------------------------------------------------------
/src/imgs/flags/mu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mu.png
--------------------------------------------------------------------------------
/src/imgs/flags/mv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mv.png
--------------------------------------------------------------------------------
/src/imgs/flags/mw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mw.png
--------------------------------------------------------------------------------
/src/imgs/flags/mx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mx.png
--------------------------------------------------------------------------------
/src/imgs/flags/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/my.png
--------------------------------------------------------------------------------
/src/imgs/flags/mz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/mz.png
--------------------------------------------------------------------------------
/src/imgs/flags/na.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/na.png
--------------------------------------------------------------------------------
/src/imgs/flags/nc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/nc.png
--------------------------------------------------------------------------------
/src/imgs/flags/ne.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ne.png
--------------------------------------------------------------------------------
/src/imgs/flags/nf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/nf.png
--------------------------------------------------------------------------------
/src/imgs/flags/ng.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ng.png
--------------------------------------------------------------------------------
/src/imgs/flags/ni.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ni.png
--------------------------------------------------------------------------------
/src/imgs/flags/nl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/nl.png
--------------------------------------------------------------------------------
/src/imgs/flags/no.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/no.png
--------------------------------------------------------------------------------
/src/imgs/flags/np.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/np.png
--------------------------------------------------------------------------------
/src/imgs/flags/nr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/nr.png
--------------------------------------------------------------------------------
/src/imgs/flags/nu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/nu.png
--------------------------------------------------------------------------------
/src/imgs/flags/nz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/nz.png
--------------------------------------------------------------------------------
/src/imgs/flags/om.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/om.png
--------------------------------------------------------------------------------
/src/imgs/flags/pa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pa.png
--------------------------------------------------------------------------------
/src/imgs/flags/pe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pe.png
--------------------------------------------------------------------------------
/src/imgs/flags/pf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pf.png
--------------------------------------------------------------------------------
/src/imgs/flags/pg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pg.png
--------------------------------------------------------------------------------
/src/imgs/flags/ph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ph.png
--------------------------------------------------------------------------------
/src/imgs/flags/pk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pk.png
--------------------------------------------------------------------------------
/src/imgs/flags/pl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pl.png
--------------------------------------------------------------------------------
/src/imgs/flags/pm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pm.png
--------------------------------------------------------------------------------
/src/imgs/flags/pn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pn.png
--------------------------------------------------------------------------------
/src/imgs/flags/pr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pr.png
--------------------------------------------------------------------------------
/src/imgs/flags/ps.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ps.png
--------------------------------------------------------------------------------
/src/imgs/flags/pt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pt.png
--------------------------------------------------------------------------------
/src/imgs/flags/pw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/pw.png
--------------------------------------------------------------------------------
/src/imgs/flags/py.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/py.png
--------------------------------------------------------------------------------
/src/imgs/flags/qa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/qa.png
--------------------------------------------------------------------------------
/src/imgs/flags/re.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/re.png
--------------------------------------------------------------------------------
/src/imgs/flags/ro.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ro.png
--------------------------------------------------------------------------------
/src/imgs/flags/rs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/rs.png
--------------------------------------------------------------------------------
/src/imgs/flags/ru.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ru.png
--------------------------------------------------------------------------------
/src/imgs/flags/rw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/rw.png
--------------------------------------------------------------------------------
/src/imgs/flags/sa.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sa.png
--------------------------------------------------------------------------------
/src/imgs/flags/sb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sb.png
--------------------------------------------------------------------------------
/src/imgs/flags/sc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sc.png
--------------------------------------------------------------------------------
/src/imgs/flags/sd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sd.png
--------------------------------------------------------------------------------
/src/imgs/flags/se.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/se.png
--------------------------------------------------------------------------------
/src/imgs/flags/sg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sg.png
--------------------------------------------------------------------------------
/src/imgs/flags/sh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sh.png
--------------------------------------------------------------------------------
/src/imgs/flags/si.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/si.png
--------------------------------------------------------------------------------
/src/imgs/flags/sj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sj.png
--------------------------------------------------------------------------------
/src/imgs/flags/sk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sk.png
--------------------------------------------------------------------------------
/src/imgs/flags/sl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sl.png
--------------------------------------------------------------------------------
/src/imgs/flags/sm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sm.png
--------------------------------------------------------------------------------
/src/imgs/flags/sn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sn.png
--------------------------------------------------------------------------------
/src/imgs/flags/so.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/so.png
--------------------------------------------------------------------------------
/src/imgs/flags/sr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sr.png
--------------------------------------------------------------------------------
/src/imgs/flags/ss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ss.png
--------------------------------------------------------------------------------
/src/imgs/flags/st.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/st.png
--------------------------------------------------------------------------------
/src/imgs/flags/sv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sv.png
--------------------------------------------------------------------------------
/src/imgs/flags/sx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sx.png
--------------------------------------------------------------------------------
/src/imgs/flags/sy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sy.png
--------------------------------------------------------------------------------
/src/imgs/flags/sz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/sz.png
--------------------------------------------------------------------------------
/src/imgs/flags/tc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tc.png
--------------------------------------------------------------------------------
/src/imgs/flags/td.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/td.png
--------------------------------------------------------------------------------
/src/imgs/flags/tf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tf.png
--------------------------------------------------------------------------------
/src/imgs/flags/tg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tg.png
--------------------------------------------------------------------------------
/src/imgs/flags/th.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/th.png
--------------------------------------------------------------------------------
/src/imgs/flags/tj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tj.png
--------------------------------------------------------------------------------
/src/imgs/flags/tk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tk.png
--------------------------------------------------------------------------------
/src/imgs/flags/tl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tl.png
--------------------------------------------------------------------------------
/src/imgs/flags/tm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tm.png
--------------------------------------------------------------------------------
/src/imgs/flags/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tn.png
--------------------------------------------------------------------------------
/src/imgs/flags/to.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/to.png
--------------------------------------------------------------------------------
/src/imgs/flags/tr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tr.png
--------------------------------------------------------------------------------
/src/imgs/flags/tt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tt.png
--------------------------------------------------------------------------------
/src/imgs/flags/tv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tv.png
--------------------------------------------------------------------------------
/src/imgs/flags/tw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tw.png
--------------------------------------------------------------------------------
/src/imgs/flags/tz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/tz.png
--------------------------------------------------------------------------------
/src/imgs/flags/ua.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ua.png
--------------------------------------------------------------------------------
/src/imgs/flags/ug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ug.png
--------------------------------------------------------------------------------
/src/imgs/flags/um.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/um.png
--------------------------------------------------------------------------------
/src/imgs/flags/us.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/us.png
--------------------------------------------------------------------------------
/src/imgs/flags/uy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/uy.png
--------------------------------------------------------------------------------
/src/imgs/flags/uz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/uz.png
--------------------------------------------------------------------------------
/src/imgs/flags/va.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/va.png
--------------------------------------------------------------------------------
/src/imgs/flags/vc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/vc.png
--------------------------------------------------------------------------------
/src/imgs/flags/ve.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ve.png
--------------------------------------------------------------------------------
/src/imgs/flags/vg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/vg.png
--------------------------------------------------------------------------------
/src/imgs/flags/vi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/vi.png
--------------------------------------------------------------------------------
/src/imgs/flags/vn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/vn.png
--------------------------------------------------------------------------------
/src/imgs/flags/vu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/vu.png
--------------------------------------------------------------------------------
/src/imgs/flags/wf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/wf.png
--------------------------------------------------------------------------------
/src/imgs/flags/ws.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ws.png
--------------------------------------------------------------------------------
/src/imgs/flags/xk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/xk.png
--------------------------------------------------------------------------------
/src/imgs/flags/ye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/ye.png
--------------------------------------------------------------------------------
/src/imgs/flags/yt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/yt.png
--------------------------------------------------------------------------------
/src/imgs/flags/za.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/za.png
--------------------------------------------------------------------------------
/src/imgs/flags/zm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/zm.png
--------------------------------------------------------------------------------
/src/imgs/flags/zw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/flags/zw.png
--------------------------------------------------------------------------------
/src/imgs/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/icon.png
--------------------------------------------------------------------------------
/src/imgs/imgage_list.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | mapfile -t image_list < <(ls -1)
4 |
5 |
6 | array_of_images = "["
7 | for i in ${image_list[@]}; do
8 | array_of_images=${array_of_images}',''"'${i}'"'
9 | done
10 | echo $array_of_images
11 |
--------------------------------------------------------------------------------
/src/imgs/location_pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/location_pin.png
--------------------------------------------------------------------------------
/src/imgs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/logo.png
--------------------------------------------------------------------------------
/src/imgs/logo_hd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/logo_hd.png
--------------------------------------------------------------------------------
/src/imgs/logo_text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/logo_text.png
--------------------------------------------------------------------------------
/src/imgs/osmo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/osmo.png
--------------------------------------------------------------------------------
/src/imgs/scrt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/scrt.png
--------------------------------------------------------------------------------
/src/imgs/spinner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/spinner.png
--------------------------------------------------------------------------------
/src/imgs/tenor.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/imgs/tenor.gif
--------------------------------------------------------------------------------
/src/kv/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/kv/__init__.py
--------------------------------------------------------------------------------
/src/main/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/main/__init__.py
--------------------------------------------------------------------------------
/src/main/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/main/icon.png
--------------------------------------------------------------------------------
/src/main/main.py:
--------------------------------------------------------------------------------
1 | from ui.interfaces import WindowManager
2 | from ui.screens import MainWindow, PreLoadWindow, WalletRestore
3 | from typedef.win import WindowNames
4 | from conf.meile_config import MeileGuiConfig
5 | from helpers.res import Resolution
6 |
7 | from kivy.lang import Builder
8 | from kivymd.app import MDApp
9 | from kivymd.theming import ThemeManager
10 | from kivy.utils import get_color_from_hex
11 | from kivy.config import Config
12 | from screeninfo import get_monitors
13 |
14 |
15 |
16 | class MyMainApp(MDApp):
17 | title = "Meile dVPN"
18 | manager = None
19 | def __init__(self,**kwargs):
20 | super(MyMainApp,self).__init__(**kwargs)
21 | from kivy.core.window import Window
22 |
23 | global MeileConfig
24 | self.icon = MeileConfig.resource_path("imgs/icon.png")
25 |
26 | global dim
27 | if Window.size[0] != dim[0] and Window.size[1] != dim[1]:
28 | Window.size = (dim[0], dim[1])
29 |
30 | if Window.left != dim[2] and Window.top != dim[3]:
31 | Window.left = dim[2]
32 | Window.top = dim[3]
33 |
34 | def build(self):
35 | global MeileConfig
36 | kv = Builder.load_file(MeileConfig.resource_path("../kv/meile.kv"))
37 |
38 | self.manager = WindowManager()
39 | theme = ThemeManager()
40 | self.theme_cls.primary_palette = "Amber"
41 | self.theme_cls.theme_style = "Dark"
42 | #self.theme_cls.disabled_primary_color = "Amber"
43 | self.theme_cls.accent_palette = "DeepPurple"
44 | #self.theme_cls.opposite_disabled_primary_color = "Amber"
45 | self.manager.add_widget(PreLoadWindow(name=WindowNames.PRELOAD))
46 | #manager.add_widget(MainWindow(name=WindowNames.MAIN_WINDOW))
47 | #manager.add_widget(WalletRestore(name=WindowNames.WALLET_RESTORE))
48 | #MeileConfig.read_configuration(MeileGuiConfig, MeileGuiConfig.CONFFILE)
49 | return self.manager
50 |
51 | global MeileConfig
52 | MeileConfig= MeileGuiConfig()
53 |
54 | global dim
55 | dim = Resolution().set_dimensions()
56 |
57 | Config.set('kivy','window_icon',MeileConfig.resource_path("imgs/icon.png"))
58 | Config.set('input', 'mouse', 'mouse,disable_multitouch')
59 | Config.set('graphics', 'width', dim[0])
60 | Config.set('graphics', 'height', dim[1])
61 | Config.set('graphics', 'left', dim[2])
62 | Config.set('graphics', 'top', dim[3])
63 | Config.write()
64 |
65 | app = MyMainApp()
--------------------------------------------------------------------------------
/src/main/meile_gui.py:
--------------------------------------------------------------------------------
1 | import main.main as Meile
2 | import asyncio
3 | from threading import Thread
4 |
5 | def main():
6 | meilethread = Thread(target=Meile.app.run())
7 | meilethread.start()
8 |
9 | if __name__ == "__main__":
10 | main()
--------------------------------------------------------------------------------
/src/typedef/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/typedef/__init__.py
--------------------------------------------------------------------------------
/src/typedef/win.py:
--------------------------------------------------------------------------------
1 |
2 | class WindowNames():
3 | WALLET_RESTORE = "walletrestore"
4 | MAIN_WINDOW = "main"
5 | PRELOAD = "preload"
6 | NODES = "nodes"
7 | WALLET = "wallet"
8 | HELP = "helpscreen"
9 | FIAT = "fiatgateway"
10 | SUBSCRIPTIONS = "subscriptions"
11 | SETTINGS = "settings"
12 | NODE_CAROUSEL = "node_carousel"
13 | PLAN = "plans"
14 |
15 |
16 | class CoinsList():
17 | SATOSHI = 1000000
18 | #ibc_mu_coins = ["tsent", "dvpn", "scrt", "osmo", "atom", "dec"]
19 | ibc_mu_coins = ["dvpn", "scrt", "osmo", "atom", "dec"]
20 | ibc_coins = { "tsent" : "tsent", "dvpn" : "udvpn", "scrt" : "uscrt", "osmo": "uosmo", "atom" : "uatom", "dec" : "udec"}
21 | coins = ["atom", "dec", "dvpn", "osmo", "scrt"]
--------------------------------------------------------------------------------
/src/ui/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/ui/__init__.py
--------------------------------------------------------------------------------
/src/ui/interfaces.py:
--------------------------------------------------------------------------------
1 | from kivymd.uix.boxlayout import MDBoxLayout
2 | from kivymd.uix.floatlayout import MDFloatLayout
3 | from kivymd.uix.tab import MDTabsBase
4 | from kivy.uix.screenmanager import ScreenManager
5 | from kivymd.uix.relativelayout import MDRelativeLayout
6 | from kivy.properties import StringProperty, NumericProperty
7 | from kivy.uix.behaviors import FocusBehavior
8 | from kivy.uix.recycleview.layout import LayoutSelectionBehavior
9 | from kivy.uix.recyclegridlayout import RecycleGridLayout
10 | from kivy.uix.image import Image
11 | from kivy.uix.boxlayout import BoxLayout
12 | from kivymd.uix.button import MDFlatButton, MDRaisedButton, MDIconButton
13 | from kivymd.uix.tooltip import MDTooltip
14 | from kivy.uix.switch import Switch
15 | from kivy_garden.mapview.view import MapView
16 | from kivymd.uix.behaviors import RoundedRectangularElevationBehavior, RectangularRippleBehavior, CircularRippleBehavior
17 | from kivymd.uix.fitimage.fitimage import FitImage
18 | from kivy.uix.behaviors import ButtonBehavior
19 | from kivymd.uix.textfield.textfield import MDTextField
20 | from kivymd.uix.label.label import MDLabel
21 | from kivymd.uix.progressbar.progressbar import MDProgressBar
22 |
23 | from conf.meile_config import MeileGuiConfig
24 | from typedef.konstants import MeileColors
25 |
26 | class Tab(MDBoxLayout, MDTabsBase):
27 | pass
28 |
29 | '''
30 | class SubscribeContent(BoxLayout):
31 | price_text = StringProperty()
32 |
33 | def __init_ (self, price):
34 | self.price_text = price
35 | '''
36 | class ProtectedLabel(MDLabel):
37 | def get_font(self):
38 | Config = MeileGuiConfig()
39 | return Config.resource_path(MeileColors.QR_FONT_FACE)
40 |
41 | class MapCenterButton(MDIconButton, MDTooltip):
42 | pass
43 |
44 | class ToolTipMDIconButton(MDIconButton, MDTooltip):
45 | pass
46 |
47 | class IPAddressTextField(MDTextField):
48 | pass
49 |
50 | class ConnectedNode(MDTextField):
51 | pass
52 |
53 | class BandwidthLabel(MDLabel):
54 | pass
55 |
56 | class BandwidthBar(MDProgressBar):
57 | pass
58 |
59 | class QuotaPct(MDLabel):
60 | pass
61 |
62 | class LatencyContent(BoxLayout):
63 |
64 | def return_latency(self):
65 | return self.ids.latency.text
66 | class YellowSwitch(Switch):
67 | pass
68 | class TooltipMDRaisedButton(MDRaisedButton, MDTooltip):
69 | pass
70 | class TooltipMDFlatButton(MDFlatButton, MDTooltip):
71 | pass
72 |
73 | class TooltipMDIconButton(MDIconButton, MDTooltip):
74 | pass
75 |
76 | class WindowManager(ScreenManager):
77 | pass
78 |
79 | class ClickableTextFieldRoundSeed(MDRelativeLayout):
80 | text = StringProperty()
81 | hint_text = StringProperty()
82 |
83 | class ClickableTextFieldRoundName(MDRelativeLayout):
84 | text = StringProperty()
85 | hint_text = StringProperty()
86 |
87 | class ClickableTextFieldRoundPass(MDRelativeLayout):
88 | text = StringProperty()
89 | hint_text = StringProperty()
90 |
91 | class SelectableRecycleGridLayout(FocusBehavior, LayoutSelectionBehavior,
92 | RecycleGridLayout):
93 | ''' Adds selection and focus behaviour to the view. '''
94 |
95 | class ContinentMap(MapView):
96 | pass
97 |
98 | class DisplayPic(ButtonBehavior, FitImage):
99 | pass
100 |
101 | class ClickableTextFieldRoundCC(MDRelativeLayout):
102 | text = StringProperty()
103 | hint_text = StringProperty()
104 |
105 | '''
106 | class ClickableTextFieldRoundName(MDRelativeLayout):
107 | text = StringProperty()
108 | hint_text = StringProperty()
109 |
110 | '''
111 | class ClickableTextFieldRoundCVV(MDRelativeLayout):
112 | text = StringProperty()
113 | hint_text = StringProperty()
114 |
115 | class TXContent(BoxLayout):
116 | pass
117 |
118 | class ConnectionDialog(MDBoxLayout):
119 | pass
120 |
121 |
--------------------------------------------------------------------------------
/src/utils/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/utils/__init__.py
--------------------------------------------------------------------------------
/src/utils/coinimg/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/utils/coinimg/__init__.py
--------------------------------------------------------------------------------
/src/utils/coinimg/dvpn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/utils/coinimg/dvpn.png
--------------------------------------------------------------------------------
/src/utils/fonts/Roboto-BoldItalic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/utils/fonts/Roboto-BoldItalic.ttf
--------------------------------------------------------------------------------
/src/utils/fonts/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/src/utils/fonts/__init__.py
--------------------------------------------------------------------------------
/src/utils/qr.py:
--------------------------------------------------------------------------------
1 | import pkg_resources
2 | import qrcode
3 |
4 | from PIL import Image
5 | from PIL import ImageDraw, ImageFont
6 | from PIL import ImageOps
7 |
8 | from os import path
9 |
10 | from conf.meile_config import MeileGuiConfig
11 |
12 | from typedef.win import CoinsList
13 |
14 | class QRCode():
15 | IMGDIR = None
16 | BASEDIR = None
17 | MeileConfig = None
18 |
19 | def __init__(self):
20 | self.BASEDIR = MeileGuiConfig.BASEDIR
21 | self.IMGDIR = MeileGuiConfig.IMGDIR
22 | self.MeileConfig = MeileGuiConfig()
23 |
24 | def generate_qr_code(self, ADDRESS):
25 | DepositCoin = CoinsList.coins[2]
26 | DepositAddress = ADDRESS
27 |
28 | coinLogo = self.MeileConfig.resource_path('../utils/coinimg/' + DepositCoin + '.png')
29 | logo = Image.open(coinLogo)
30 | basewidth = 100
31 |
32 | # adjust image size
33 | wpercent = (basewidth/float(logo.size[0]))
34 | hsize = int((float(logo.size[1])*float(wpercent)))
35 | logo = logo.resize((basewidth, hsize))
36 |
37 | QRcode = qrcode.QRCode(error_correction=qrcode.constants.ERROR_CORRECT_H)
38 | QRcode.add_data(DepositAddress)
39 | QRcode.make()
40 |
41 | QRimg = QRcode.make_image(fill_color='Black', back_color="white").convert('RGB')
42 |
43 | # set size of QR code
44 | pos = ((QRimg.size[0] - logo.size[0]) // 2,
45 | (QRimg.size[1] - logo.size[1]) // 2)
46 |
47 | QRimg.paste(logo, pos)
48 |
49 | # crop a bit
50 | border = (0, 4, 0, 30) # left, top, right, bottom
51 | QRimg = ImageOps.crop(QRimg, border)
52 |
53 |
54 | # Next Process is adding and centering the Deposit address on the image
55 | # Creating a background a little larger and pasting the QR
56 | # Image onto it with the text
57 | if len(DepositAddress) <= 50:
58 | fontSize = 13
59 | elif len(DepositAddress) <=75:
60 | fontSize = 12
61 | else:
62 | fontSize = 11
63 |
64 | background = Image.new('RGBA', (QRimg.size[0], QRimg.size[1] + 15), (255,255,255,255))
65 | #robotoFont = ImageFont.truetype(pkg_resources.resource_filename(__name__, os.path.join('fonts', 'Roboto-BoldItalic.ttf')), fontSize)
66 | robotoFont = ImageFont.truetype(self.MeileConfig.resource_path('../utils/fonts/Roboto-BoldItalic.ttf'), fontSize)
67 |
68 | draw = ImageDraw.Draw(background)
69 |
70 | _, _, w, h = draw.textbbox((0, 0), text=str(DepositAddress))
71 | draw.text(((QRimg.size[0]+15 - w)/2,QRimg.size[1]-2),DepositAddress, (0,0,0), font=robotoFont)
72 |
73 | background.paste(QRimg, (0,0))
74 | background.save(path.join(self.IMGDIR, ADDRESS + ".png"))
75 |
--------------------------------------------------------------------------------
/tests/GetInfoButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/GetInfoButton.png
--------------------------------------------------------------------------------
/tests/SubscribeButton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/SubscribeButton.png
--------------------------------------------------------------------------------
/tests/at.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/at.png
--------------------------------------------------------------------------------
/tests/blah.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/blah.png
--------------------------------------------------------------------------------
/tests/canvas.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 |
3 | import awoc
4 | from kivy.factory import Factory
5 |
6 | from kivymd.app import MDApp
7 | from kivymd.uix.tab import MDTabsBase
8 | from kivymd.uix.boxlayout import MDBoxLayout
9 | from kivy.uix.popup import Popup
10 | from kivy.uix.label import Label
11 | from kivymd.uix.spinner import MDSpinner
12 |
13 | our_world = awoc.AWOC()
14 |
15 | CONTINENTS = our_world.get_continents_list()
16 | Africa = our_world.get_countries_list_of(CONTINENTS[0])
17 | Anarctica = our_world.get_countries_list_of(CONTINENTS[1])
18 | Asia = our_world.get_countries_list_of(CONTINENTS[2])
19 | Europe = our_world.get_countries_list_of(CONTINENTS[3])
20 | NorthAmerica = our_world.get_countries_list_of(CONTINENTS[4])
21 | Oceania = our_world.get_countries_list_of(CONTINENTS[5])
22 | SouthAmerica = our_world.get_countries_list_of(CONTINENTS[6])
23 |
24 |
25 | canvas = '''
26 |
27 | orientation: 'vertical'
28 |
29 | MDToolbar:
30 | title: app.title
31 | md_bg_color: 0,0,0,1
32 | height: "100dp"
33 |
34 | FitImage:
35 | source: "../src/imgs/logo.png"
36 | size_hint: None, None
37 | height: "100dp"
38 | pos: self.pos
39 |
40 |
41 |
42 | MDTabs:
43 | id: android_tabs
44 | on_tab_switch: app.on_tab_switch(*args)
45 | size_hint_y: None
46 | height: "48dp"
47 | tab_indicator_anim: True
48 | color: 0,0,0,1
49 | md_bg_color: 0,0,0,1
50 |
51 | RecycleView:
52 | id: rv
53 | key_viewclass: "viewclass"
54 | key_size: "height"
55 |
56 | RecycleBoxLayout:
57 | default_size: None, dp(48)
58 | default_size_hint: 1, None
59 | size_hint_y: None
60 | height: self.minimum_height
61 | orientation: "vertical"
62 | MDRaisedButton:
63 | id: wallet_button
64 | text: "Wallet"
65 | pos_hint: {"center_x": .5, "center_y": .5}
66 | on_press: app.change_tab()
67 |
68 |
69 |
70 |
71 |
72 | :
73 | # Draw a background to indicate selection
74 | text1: "GLARGLY"
75 | text2: "BLARGLY"
76 | text3: "SHIMARGLY"
77 | canvas.before:
78 |
79 | Color:
80 | rgba: (.0, 0.9, .1, .3) if self.selected else (0, 0, 0, 1)
81 | Rectangle:
82 | pos: self.pos
83 | size: self.size
84 |
85 | :
86 | viewclass: 'SelectableLabel'
87 | RecycleBoxLayout:
88 | default_size: None, dp(48)
89 | default_size_hint: 1, None
90 | size_hint_y: None
91 | height: self.minimum_height
92 | orientation: "vertical"
93 |
94 |
95 |
96 | orientation: "vertical"
97 | height: node_box.height
98 | focus_behavior: True
99 | ripple_behavior: True
100 |
101 | moniker_text: "BLARGLY"
102 | moniker2_text: "GLARGLY"
103 | moniker3_text: "SHLARMLY"
104 |
105 | BoxLayout:
106 | id: node_box
107 | size_hint_y: None
108 | height: "50dp"
109 |
110 | canvas:
111 | Rectangle:
112 | pos: self.pos
113 | size: self.size
114 |
115 | MDLabel:
116 | id: label_box
117 |
118 | text: root.moniker_text
119 | MDLabel:
120 | id: label_box
121 |
122 | text: root.moniker2_text
123 | MDLabel:
124 | id: label_box
125 |
126 | text: root.moniker3_text
127 |
128 |
129 |
130 | MDSeparator:
131 |
132 |
133 | '''
134 | class Tab(MDBoxLayout, MDTabsBase):
135 | pass
136 |
137 |
138 | class Palette(MDApp):
139 | title = "Meile dVPN"
140 | ConNodes = []
141 |
142 | def change_tab(self):
143 |
144 | popup = Popup(title='Loading...',
145 | size_hint=(None, None), size=(120, 120),
146 | pos_hint={"center_x": .5, "center_y": 0})
147 | spinner = MDSpinner(size_hint=(None, None),
148 | size=("46dp", "46dp"),
149 | pos_hint={'center_x': 1, 'center_y': .5})
150 | popup.add_widget(spinner)
151 | self.screen.add_widget(popup)
152 | def build(self):
153 | Builder.load_string(canvas)
154 | self.screen = Factory.Root()
155 |
156 | for name_tab in CONTINENTS:
157 | tab = Tab(text=name_tab)
158 | self.screen.ids.android_tabs.add_widget(tab)
159 |
160 |
161 | return self.screen
162 |
163 | def on_tab_switch(self, instance_tabs, instance_tab, instance_tabs_label, tab_text):
164 | return
165 |
166 | def on_start(self):
167 |
168 |
169 | self.on_tab_switch(
170 | None,
171 | None,
172 | None,
173 | self.screen.ids.android_tabs.ids.layout.children[-1].text
174 | )
175 |
176 | Palette().run()
--------------------------------------------------------------------------------
/tests/card.py:
--------------------------------------------------------------------------------
1 | from kivy.uix.modalview import ModalView
2 | from kivy.lang import Builder
3 |
4 | from kivymd import images_path
5 | from kivymd.app import MDApp
6 | from kivymd.uix.card import MDCard
7 |
8 | Builder.load_string(
9 | '''
10 | :
11 | elevation: 10
12 | radius: [36, ]
13 |
14 | FitImage:
15 | id: bg_image
16 | source: "images/bg.png"
17 | size_hint_y: .35
18 | pos_hint: {"top": 1}
19 | radius: 36, 36, 0, 0
20 | ''')
21 |
22 |
23 | class Card(MDCard):
24 | pass
25 |
26 |
27 | class Example(MDApp):
28 | def build(self):
29 | modal = ModalView(
30 | size_hint=(0.4, 0.8),
31 | background=f"{images_path}/transparent.png",
32 | overlay_color=(0, 0, 0, 0),
33 | )
34 | modal.add_widget(Card())
35 | modal.open()
36 |
37 |
38 | Example().run()
--------------------------------------------------------------------------------
/tests/card2.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivy.properties import StringProperty
3 | from kivy.utils import get_color_from_hex
4 |
5 | from kivymd.app import MDApp
6 | from kivymd.uix.behaviors import RoundedRectangularElevationBehavior
7 | from kivymd.uix.card import MDCard
8 |
9 | KV = '''
10 | #:import get_color_from_hex kivy.utils.get_color_from_hex
11 |
12 |
13 |
14 | padding: 16
15 | size_hint: None, None
16 | size: "200dp", "100dp"
17 |
18 | MDRelativeLayout:
19 | size_hint: None, None
20 | size: root.size
21 |
22 | MDIconButton:
23 | icon: "dots-vertical"
24 | pos:
25 | root.width - (self.width + root.padding[0] + dp(4)), root.height - (self.height + root.padding[0] + dp(4))
26 |
27 | MDLabel:
28 | id: label
29 | text: root.text
30 | adaptive_size: True
31 | color: .2, .2, .2, .8
32 |
33 |
34 | MDScreen:
35 |
36 | MDBoxLayout:
37 | id: box
38 | adaptive_size: True
39 | spacing: "56dp"
40 | pos_hint: {"center_x": .5, "center_y": .5}
41 | '''
42 |
43 |
44 | class MD3Card(MDCard, RoundedRectangularElevationBehavior):
45 | '''Implements a material design v3 card.'''
46 |
47 | text = StringProperty()
48 |
49 |
50 | class TestCard(MDApp):
51 | def build(self):
52 | self.theme_cls.material_style = "M3"
53 | return Builder.load_string(KV)
54 |
55 | def on_start(self):
56 | styles = {
57 | "elevated": "#f6eeee", "filled": "#f4dedc", "outlined": "#f8f5f4"
58 | }
59 | for style in styles.keys():
60 | self.root.ids.box.add_widget(
61 | MD3Card(
62 | line_color=(0.2, 0.2, 0.2, 0.8),
63 | text=style.capitalize(),
64 | md_bg_color=get_color_from_hex(styles[style]),
65 | )
66 | )
67 |
68 |
69 | TestCard().run()
70 |
--------------------------------------------------------------------------------
/tests/change_screens.py:
--------------------------------------------------------------------------------
1 | from kivy.app import App
2 | from kivy.lang import Builder
3 | from kivy.uix.screenmanager import ScreenManager, Screen
4 | from kivy.clock import Clock
5 | from kivyoav.delayed import delayable
6 |
7 |
8 | class MainWindow(Screen):
9 |
10 | StatusMessages = ["Calculating π...", "Squaring the Circle...", "Solving the Riemann Hypothesis...", "Done"]
11 | title = "Meile dVPN"
12 | k = 0
13 | j = 0
14 |
15 | def __init__(self, **kwargs):
16 | super(MainWindow, self).__init__()
17 |
18 | # Schedule the functions to be called every n seconds
19 | Clock.schedule_interval(self.update_status_text, 1)
20 |
21 | @delayable
22 | def update_status_text(self, dt):
23 | yield 1.0
24 | if self.j == 2:
25 | self.manager.get_screen('main').label_text = self.StatusMessages[3]
26 | return
27 |
28 | if self.k == 3:
29 | self.k = 0
30 | self.j += 1
31 | else:
32 | self.manager.get_screen('main').label_text = self.StatusMessages[self.k]
33 | self.k += 1
34 |
35 |
36 | class SecondWindow(Screen):
37 | pass
38 |
39 |
40 | class WindowManager(ScreenManager):
41 | pass
42 |
43 |
44 | canvas = '''
45 | WindowManager:
46 | MainWindow:
47 | SecondWindow:
48 |
49 | :
50 | name: "main"
51 | label_text: "Password:"
52 |
53 | GridLayout:
54 | cols:1
55 |
56 | GridLayout:
57 | cols: 2
58 |
59 | Label:
60 | text: root.label_text
61 |
62 | TextInput:
63 | id: passw
64 | multiline: False
65 |
66 | Button:
67 | text: "Submit"
68 | on_release:
69 | app.root.current = "second" if passw.text == "tim" else "main"
70 | root.manager.transition.direction = "left"
71 |
72 |
73 | :
74 | name: "second"
75 |
76 | Button:
77 | text: "Go Back"
78 | on_release:
79 | app.root.current = "main"
80 | root.manager.transition.direction = "right"
81 | '''
82 |
83 |
84 |
85 | class MyMainApp(App):
86 | def build(self):
87 | kv = Builder.load_string(canvas)
88 |
89 | screenManager = ScreenManager()
90 | screenManager.add_widget(MainWindow(name='main'))
91 | screenManager.add_widget(SecondWindow(name='second'))
92 | return screenManager
93 |
94 | if __name__ == "__main__":
95 | MyMainApp().run()
--------------------------------------------------------------------------------
/tests/cli/__pycache__/wallet.cpython-38.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/cli/__pycache__/wallet.cpython-38.pyc
--------------------------------------------------------------------------------
/tests/config_parser_test.py:
--------------------------------------------------------------------------------
1 | import configparser
2 |
3 | if __name__ == "__main__":
4 | configfile = 'test_config.ini'
5 |
6 | CONFIG = configparser.ConfigParser()
7 |
8 | CONFIG.read(configfile)
9 | print(CONFIG.sections())
10 |
11 |
12 | if CONFIG.has_section('network'):
13 | print("Section 'network' exists")
14 | else:
15 | CONFIG.add_section('network')
16 | CONFIG.set('network', 'rpc', 'https://rpc.mathnodes.com:443')
17 |
18 | FILE = open(configfile, 'w')
19 | CONFIG.write(FILE)
20 |
21 | for section in CONFIG.sections():
22 | for key,value in CONFIG.items(section):
23 | print(f"{key}, {value}")
--------------------------------------------------------------------------------
/tests/continents.py:
--------------------------------------------------------------------------------
1 | import awoc
2 |
3 | class OurWorld():
4 | our_world = awoc.AWOC()
5 |
6 | CONTINENTS = our_world.get_continents_list()
7 | Africa = our_world.get_countries_list_of(CONTINENTS[0])
8 | Anarctica = our_world.get_countries_list_of(CONTINENTS[1])
9 | Asia = our_world.get_countries_list_of(CONTINENTS[2])
10 | Europe = our_world.get_countries_list_of(CONTINENTS[3])
11 | NorthAmerica = our_world.get_countries_list_of(CONTINENTS[4])
12 | Oceania = our_world.get_countries_list_of(CONTINENTS[5])
13 | SouthAmerica = our_world.get_countries_list_of(CONTINENTS[6])
14 |
--------------------------------------------------------------------------------
/tests/determine_denom.py:
--------------------------------------------------------------------------------
1 | UNITTOKEN = {'uscrt' : 'scrt', 'uatom' : 'atom' , 'uosmo' : 'osmo', 'udec' : 'dec', 'udvpn' : 'dvpn'}
2 |
3 | DEPOSIT = "5000000udec"
4 |
5 | for key in UNITTOKEN.keys():
6 | if key in DEPOSIT:
7 | print(key)
--------------------------------------------------------------------------------
/tests/dialog.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivy.uix.boxlayout import BoxLayout
3 | from kivymd.uix.button import MDFlatButton, MDRaisedButton,MDTextButton, MDFillRoundFlatButton
4 |
5 | from kivymd.app import MDApp
6 | from kivymd.uix.button import MDFlatButton
7 | from kivymd.uix.dialog import MDDialog
8 | from kivy.properties import StringProperty
9 | from kivymd.uix.floatlayout import MDFloatLayout
10 | from kivymd.uix.boxlayout import MDBoxLayout
11 | from kivy.utils import get_color_from_hex
12 | KV = '''
13 |
14 | orientation: "vertical"
15 | spacing: "12dp"
16 | size_hint_y: None
17 | height: "120dp"
18 |
19 | MDTextField:
20 | hint_text: "City"
21 |
22 | MDTextField:
23 | hint_text: "Street"
24 |
25 |
26 | MDFloatLayout:
27 |
28 | MDFlatButton:
29 | text: "ALERT DIALOG"
30 | pos_hint: {'center_x': .5, 'center_y': .5}
31 | on_release: app.show_confirmation_dialog()
32 |
33 |
34 |
35 | spacing: "1dp"
36 | size_hint_y: None
37 | height: "100dp"
38 | price_text: ""
39 | naddress: " "
40 | moniker: " "
41 | orientation: "vertical"
42 | MDFloatLayout:
43 | MDLabel:
44 | id: node_moniker_text
45 | text: root.moniker
46 | font_size: 19
47 | pos_hint: {"x" : 0.05, "center_y": .9}
48 |
49 | MDLabel:
50 | id: node_addresss_text
51 | text: root.naddress
52 | font_size: 10
53 | pos_hint: {"x" : 0.05, "center_y": .70}
54 |
55 | MDSlider:
56 | id: rating_slider
57 | min: 1
58 | max: 10
59 | value: 9
60 | pos_hint: {"x" : 0.00, "center_y": .5}
61 |
62 |
63 | orientation: "vertical"
64 | spacing: "1dp"
65 | size_hint_y: None
66 | height: "130dp"
67 | price_text: ""
68 | naddress: " "
69 | moniker: " "
70 | deposit: " "
71 | MDFloatLayout:
72 | MDLabel:
73 | id: moniker
74 | text: root.moniker
75 | theme_text_color: "Custom"
76 | font_style: "Subtitle2"
77 | font_size: "20sp"
78 | text_color: get_color_from_hex("#fcb711")
79 | pos_hint: {"x" : 0, "top" : 1.35}
80 | MDLabel:
81 | id: naddress
82 | text: root.naddress
83 | theme_text_color: "Custom"
84 | font_style: "Subtitle2"
85 | font_size: "9sp"
86 | text_color: get_color_from_hex("#ffffff")
87 | pos_hint: {"x" : 0, "top" : 1.2}
88 | MDLabel:
89 | id: deposit
90 | text: root.deposit
91 | theme_text_color: "Custom"
92 | font_style: "Subtitle2"
93 | font_size: "18sp"
94 | text_color: get_color_from_hex("#fcb711")
95 | pos_hint: {"x" : 0, "top" : .95}
96 |
97 | '''
98 |
99 |
100 | class ProcessingSubDialog(BoxLayout):
101 | moniker = StringProperty()
102 | naddress = StringProperty()
103 | deposit = StringProperty()
104 |
105 | def __init__(self, moniker, naddress, deposit):
106 | super(ProcessingSubDialog, self).__init__()
107 | self.moniker = moniker
108 | self.naddress = naddress
109 | self.deposit = deposit
110 |
111 |
112 | class Content(BoxLayout):
113 | pass
114 | class RatingContent(MDBoxLayout):
115 | naddress = StringProperty()
116 | moniker = StringProperty()
117 |
118 | def __init__(self, moniker, naddress):
119 | super(RatingContent, self).__init__()
120 | self.naddress = naddress
121 | self.moniker = moniker
122 |
123 | class Example(MDApp):
124 | dialog = None
125 |
126 | def build(self):
127 | return Builder.load_string(KV)
128 |
129 | def show_confirmation_dialog(self):
130 | if not self.dialog:
131 | spdialog = ProcessingSubDialog("BALLS IN YOUR MOUTH", "sentnodeahf89aqw8yrihasifhaw7yr87yihbaw", "100dvpn" )
132 | self.dialog = None
133 | self.dialog = MDDialog(
134 | title="Subscribing...",
135 | type="custom",
136 | content_cls=spdialog,
137 | md_bg_color=get_color_from_hex("#0d021b"),
138 | )
139 | self.dialog.open()
140 | def remove_loading_widget(self, dt):
141 | try:
142 | self.dialog.dismiss()
143 | self.dialog = None
144 | except Exception as e:
145 | print(str(e))
146 | pass
147 |
148 | Example().run()
--------------------------------------------------------------------------------
/tests/dialog_sub_type.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivy.uix.boxlayout import BoxLayout
3 | from kivymd.uix.button import MDFlatButton, MDRaisedButton,MDTextButton, MDFillRoundFlatButton
4 |
5 | from kivymd.app import MDApp
6 | from kivymd.uix.button import MDFlatButton
7 | from kivymd.uix.dialog import MDDialog
8 | from kivy.properties import StringProperty
9 | from kivymd.uix.floatlayout import MDFloatLayout
10 | from kivymd.uix.boxlayout import MDBoxLayout
11 | from kivy.utils import get_color_from_hex
12 | KV = '''
13 |
14 | orientation: "vertical"
15 | spacing: "12dp"
16 | size_hint_y: None
17 | height: "120dp"
18 |
19 | MDTextField:
20 | hint_text: "City"
21 |
22 | MDTextField:
23 | hint_text: "Street"
24 |
25 |
26 | MDFloatLayout:
27 |
28 | MDFlatButton:
29 | text: "ALERT DIALOG"
30 | pos_hint: {'center_x': .5, 'center_y': .5}
31 | on_release: app.show_confirmation_dialog()
32 |
33 |
34 |
35 | spacing: "1dp"
36 | size_hint_y: None
37 | height: "100dp"
38 | price_text: ""
39 | naddress: " "
40 | moniker: " "
41 | orientation: "vertical"
42 | MDFloatLayout:
43 | MDLabel:
44 | id: node_moniker_text
45 | text: root.moniker
46 | font_size: 19
47 | pos_hint: {"x" : 0.05, "center_y": .9}
48 |
49 | MDLabel:
50 | id: node_addresss_text
51 | text: root.naddress
52 | font_size: 10
53 | pos_hint: {"x" : 0.05, "center_y": .70}
54 |
55 | MDSlider:
56 | id: rating_slider
57 | min: 1
58 | max: 10
59 | value: 9
60 | pos_hint: {"x" : 0.00, "center_y": .5}
61 |
62 |
63 | orientation: "vertical"
64 | spacing: "1dp"
65 | size_hint_y: None
66 | height: "130dp"
67 | price_text: ""
68 | naddress: " "
69 | moniker: " "
70 | deposit: " "
71 | MDFloatLayout:
72 | MDLabel:
73 | id: sub_type
74 | text: "Subscription Type"
75 | theme_text_color: "Custom"
76 | font_style: "Subtitle2"
77 | font_size: "20sp"
78 | text_color: get_color_from_hex("#fcb711")
79 | pos_hint: {"x" : 0, "top" : 1.35}
80 | MDLabel:
81 | id: bandwidth_text
82 | text: "Bandwidth (GB)"
83 | theme_text_color: "Custom"
84 | font_style: "Subtitle2"
85 | font_size: "14sp"
86 | text_color: get_color_from_hex("#ffffff")
87 | pos_hint: {"x" : 0, "top" : 1}
88 | CheckBox:
89 | group: "sub_type"
90 | on_active: root.select_sub_type(self, self.active, "gb")
91 | pos_hint: {"x": 0, "y" : .375}
92 | size_hint_y: .3
93 | MDLabel:
94 | id: hourly_text
95 | text: "Hourly"
96 | theme_text_color: "Custom"
97 | font_style: "Subtitle2"
98 | font_size: "14sp"
99 | text_color: get_color_from_hex("#ffffff")
100 | pos_hint: {"x" : 0, "top" : .8}
101 | CheckBox:
102 | group: "sub_type"
103 | on_active: root.select_sub_type(self, self.active, "hourly")
104 | pos_hint: {"x": 0, "y" : .15}
105 | size_hint_y: .3
106 | '''
107 |
108 |
109 | class SubTypeDialog(BoxLayout):
110 |
111 | def __init__(self):
112 | super(SubTypeDialog, self).__init__()
113 |
114 | def select_sub_type(self,instance, value, type):
115 | if type == "gb":
116 | print("You have selected bandwidth")
117 | else:
118 | print("You have selected hourly")
119 |
120 | class Content(BoxLayout):
121 | pass
122 | class RatingContent(MDBoxLayout):
123 | naddress = StringProperty()
124 | moniker = StringProperty()
125 |
126 | def __init__(self, moniker, naddress):
127 | super(RatingContent, self).__init__()
128 | self.naddress = naddress
129 | self.moniker = moniker
130 |
131 | class Example(MDApp):
132 | dialog = None
133 |
134 | def build(self):
135 | return Builder.load_string(KV)
136 |
137 |
138 | def show_confirmation_dialog(self):
139 | if not self.dialog:
140 | stypedialog = SubTypeDialog()
141 | self.dialog = None
142 | self.dialog = MDDialog(
143 | type="custom",
144 | content_cls=stypedialog,
145 | md_bg_color=get_color_from_hex("#0d021b"),
146 | )
147 | self.dialog.open()
148 | def remove_loading_widget(self, dt):
149 | try:
150 | self.dialog.dismiss()
151 | self.dialog = None
152 | except Exception as e:
153 | print(str(e))
154 | pass
155 |
156 | Example().run()
--------------------------------------------------------------------------------
/tests/dropdown.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivy.metrics import dp
3 | from kivy.properties import StringProperty
4 |
5 | from kivymd.uix.list import OneLineIconListItem
6 | from kivymd.app import MDApp
7 | from kivymd.uix.menu import MDDropdownMenu
8 |
9 | KV = '''
10 |
11 |
12 | IconLeftWidget:
13 | icon: "server-security"
14 |
15 |
16 |
17 | MDBoxLayout:
18 | orientation: "vertical"
19 | MDLabel:
20 | font_name: "Roboto-Bold"
21 | text: "SETTINGS"
22 | font_size: "30sp"
23 | size_hint_y: .1
24 | pos_hint: { "center_x": .9, "top": .5}
25 | theme_text_color: "Custom"
26 | text_color: get_color_from_hex("#fcb711")
27 | MDFloatLayout:
28 |
29 | MDLabel:
30 | font_name: "Roboto-Bold"
31 | text: "RPC"
32 | font_size: "15sp"
33 | size_hint_y: .1
34 | size_hint_x: .2
35 | width: dp(500)
36 | pos_hint: { "x": .05, "top": 1}
37 |
38 | MDDropDownItem:
39 | id: drop_item
40 | size_hint_x: .5
41 | pos_hint: {'x': .5, 'top': 1}
42 | text: 'https://rpc.mathnodes.com:443'
43 | on_release: app.menu.open()
44 | MDRaisedButton:
45 | text: "SAVE"
46 | on_release: root.refresh_wallet()
47 |
48 | '''
49 |
50 |
51 | class IconListItem(OneLineIconListItem):
52 | icon = StringProperty()
53 |
54 |
55 | class Test(MDApp):
56 | def __init__(self, **kwargs):
57 | super().__init__(**kwargs)
58 | self.screen = Builder.load_string(KV)
59 |
60 | rpcs = ['https://rpc.mathnodes.com:443', 'https://rpc.sentinel.co:443', 'https://sentinel-rpc.badgerbite.io:443',
61 | 'https://sentinel-rpc2.badgerbite.io:443', 'https://rpc.sentinel.quokkastake.io:443', 'https://rpc-sentinel.whispernode.com:443',
62 | 'https://rpc-sentinel-ia.cosmosia.notional.ventures:443']
63 |
64 | menu_items = [
65 | {
66 | "viewclass": "IconListItem",
67 | "icon": "git",
68 | "text": f"{i}",
69 | "height": dp(56),
70 | "on_release": lambda x=f"{i}": self.set_item(x),
71 | } for i in rpcs
72 | ]
73 | self.menu = MDDropdownMenu(
74 | caller=self.screen.ids.drop_item,
75 | items=menu_items,
76 | position="center",
77 | width_mult=50,
78 | )
79 | self.menu.bind()
80 |
81 | def set_item(self, text_item):
82 | self.screen.ids.drop_item.set_item(text_item)
83 | self.menu.dismiss()
84 |
85 | def build(self):
86 | return self.screen
87 |
88 |
89 | Test().run()
--------------------------------------------------------------------------------
/tests/getres.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/getres.py
--------------------------------------------------------------------------------
/tests/gradient.py:
--------------------------------------------------------------------------------
1 | from kivy.uix.screenmanager import ScreenManager
2 | from kivymd.app import MDApp
3 | from kivy.lang import Builder
4 |
5 | from kivy.uix.screenmanager import Screen, SlideTransition
6 |
7 | kv = """
8 | #:import get_color_from_hex kivy.utils.get_color_from_hex
9 | #:import Gradient kivy_gradient.Gradient
10 |
11 | WindowManager:
12 |
13 | :
14 | name: "main"
15 | canvas:
16 | Rectangle:
17 | size: self.size
18 | pos: self.pos
19 | texture: Gradient.horizontal(get_color_from_hex("E91E63"), get_color_from_hex("FCE4EC"))
20 |
21 | MDLabel:
22 | text: "BLARGY"
23 | id: country
24 | theme_text_color: "Custom"
25 | font_style: "H6"
26 | font_size: "18sp"
27 | text_color: get_color_from_hex("#000000")
28 | """
29 |
30 |
31 | class WindowManager(ScreenManager):
32 | pass
33 |
34 | class MainScreen(Screen):
35 | def __init__(self, **kwargs):
36 | super(MainScreen, self).__init__(**kwargs)
37 | print("Blargy")
38 | class Test(MDApp):
39 | def build(self):
40 | kv2 = Builder.load_string(kv)
41 | manager = WindowManager()
42 | manager.add_widget(MainScreen(name="main"))
43 | return manager
44 |
45 | if __name__ == "__main__":
46 | app = Test()
47 | app.run()
48 |
--------------------------------------------------------------------------------
/tests/label_change.py:
--------------------------------------------------------------------------------
1 | from kivy.app import App
2 | from kivy.lang import Builder
3 | from kivy.uix.screenmanager import ScreenManager, Screen
4 | from kivy.properties import StringProperty
5 |
6 | Builder.load_string('''
7 | :
8 | BoxLayout:
9 | orientation: "vertical"
10 | Button:
11 | text: 'Goto strategy'
12 | on_press: root.manager.current = 'strategy'
13 | Button:
14 | text: 'Set text'
15 | on_press: root.SetText()
16 |
17 | :
18 | BoxLayout:
19 | orientation: "vertical"
20 | Label:
21 | text: root.labelText
22 | Button:
23 | text: 'Back to menu'
24 | on_press: root.manager.current = 'main'
25 | ''')
26 |
27 | class MainScreen(Screen):
28 | def SetText(self):
29 | text = 'Total=' + str(17*21)
30 | self.manager.get_screen('strategy').labelText = text
31 |
32 | class StrategyScreen(Screen):
33 | labelText = StringProperty('My label')
34 |
35 | class TestApp(App):
36 | def build(self):
37 | # Create the screen manager
38 | screenManager = ScreenManager()
39 | screenManager.add_widget(MainScreen(name='main'))
40 | screenManager.add_widget(StrategyScreen(name='strategy'))
41 | return screenManager
42 |
43 | if __name__ == '__main__':
44 | TestApp().run()
--------------------------------------------------------------------------------
/tests/listdict.py:
--------------------------------------------------------------------------------
1 | IBCSCRT = 'ibc/31FEE1A2A9F9C01113F90BD0BBCCE8FD6BBB8585FAF109A2101827DD1D5B95B8'
2 | IBCATOM = 'ibc/A8C2D23A1E6F95DA4E48BA349667E322BD7A6C996D8A4AAE8BA72E190F3D1477'
3 | IBCDEC = 'ibc/B1C0DDB14F25279A2026BC8794E12B259F8BDA546A3C5132CCAEE4431CE36783'
4 | IBCOSMO = 'ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518'
5 | IBCUNKWN = 'ibc/9BCB27203424535B6230D594553F1659C77EC173E36D9CF4759E7186EE747E84'
6 |
7 |
8 | IBCCOINS = [{'uscrt' : IBCSCRT}, {'uatom' : IBCATOM}, {'udec' : IBCDEC}, {'uosmo' : IBCOSMO}, {'uknwn' :IBCUNKWN}]
9 |
10 |
11 | for ibc_coin in IBCCOINS:
12 | k = ibc_coin.keys()
13 | v = ibc_coin.values()
14 | for key,value in zip(k,v):
15 | print(key)
16 | print(value)
17 |
18 |
--------------------------------------------------------------------------------
/tests/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/logo.png
--------------------------------------------------------------------------------
/tests/moar_swipe.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivy.properties import StringProperty
3 |
4 | from kivymd.app import MDApp
5 | from kivymd.uix.card import MDCardSwipe
6 |
7 | KV = '''
8 | :
9 | size_hint_y: None
10 | height: content.height
11 |
12 | MDCardSwipeLayerBox:
13 | # Content under the card.
14 |
15 | MDCardSwipeFrontBox:
16 |
17 | # Content of card.
18 | OneLineListItem:
19 | id: content
20 | text: root.text
21 | _no_ripple_effect: True
22 |
23 |
24 | MDScreen:
25 |
26 | MDBoxLayout:
27 | orientation: "vertical"
28 | spacing: "10dp"
29 |
30 | MDToolbar:
31 | elevation: 10
32 | title: "MDCardSwipe"
33 |
34 | ScrollView:
35 | scroll_timeout : 100
36 |
37 | MDList:
38 | id: md_list
39 | padding: 0
40 | '''
41 |
42 |
43 | class SwipeToDeleteItem(MDCardSwipe):
44 | '''Card with `swipe-to-delete` behavior.'''
45 |
46 | text = StringProperty()
47 |
48 |
49 | class TestCard(MDApp):
50 | def __init__(self, **kwargs):
51 | super().__init__(**kwargs)
52 | self.screen = Builder.load_string(KV)
53 |
54 | def build(self):
55 | return self.screen
56 |
57 | def on_start(self):
58 | '''Creates a list of cards.'''
59 |
60 | for i in range(20):
61 | self.screen.ids.md_list.add_widget(
62 | SwipeToDeleteItem(text=f"One-line item {i}")
63 | )
64 |
65 |
66 | TestCard().run()
--------------------------------------------------------------------------------
/tests/mod.py:
--------------------------------------------------------------------------------
1 | price = 0.00052
2 | MAX_SPEND = 25
3 |
4 | qty = int(MAX_SPEND/price)
5 |
6 | x = 1 / price
7 | if x < 10:
8 | factor = 1
9 | elif 10 < x < 100:
10 | factor = 10
11 | elif 100 < x < 1000:
12 | factor = 100
13 | elif 1000 < x < 10000:
14 | factor = 1000
15 | else:
16 | factor = 10000
17 |
18 | mod_qty = qty % factor
19 |
20 | qty = qty - mod_qty
21 |
22 | print(qty/8)
23 |
--------------------------------------------------------------------------------
/tests/progress_bar.py:
--------------------------------------------------------------------------------
1 | from kivymd.app import MDApp
2 | from kivy.uix.screenmanager import Screen, ScreenManager
3 | from kivy.lang import Builder
4 | from kivy.utils import get_color_from_hex
5 | KV = '''
6 | #: import get_color_from_hex kivy.utils.get_color_from_hex
7 | :
8 | progression_value:25
9 |
10 | BoxLayout:
11 | orientation:'vertical'
12 | padding:dp(24),0,dp(24),0
13 | Widget:
14 |
15 | MDProgressBar:
16 | value: root.progression_value
17 | color: 0,0,0,0
18 | size_hint_y:None
19 | height:dp(10)
20 | canvas:
21 |
22 | Color:
23 | rgba: 0,0,0,.3
24 | BorderImage:
25 | border: (dp(10), dp(10), dp(10), dp(10))
26 | pos: self.x, self.center_y - dp(5)
27 | size: self.width, dp(10)
28 | Color:
29 | rgba: get_color_from_hex("#fcb711")
30 | BorderImage:
31 | border: [int(min(self.width * (self.value / float(self.max)) if self.max else 0, dp(10)))] * 4
32 | pos: self.x, self.center_y -dp(5)
33 | size: self.width * (self.value / float(self.max)) if self.max else 0, dp(10)
34 |
35 | Widget:
36 | '''
37 | class home(Screen):
38 | pass
39 |
40 | class Test(MDApp):
41 | def build(self):
42 | Builder.load_string(KV)
43 | self.sm = ScreenManager()
44 | self.sm.add_widget(home(name="home"))
45 |
46 | return self.sm
47 |
48 | Test().run()
--------------------------------------------------------------------------------
/tests/py_environ.py:
--------------------------------------------------------------------------------
1 | import os
2 | print(os.environ['PATH'])
3 |
--------------------------------------------------------------------------------
/tests/readofile.py:
--------------------------------------------------------------------------------
1 | import os
2 | ofilestr = '''
3 | Enter keyring passphrase:balhfashlfaj
4 |
5 | gas estimate: 104648
6 | code: 0
7 | codespace: ""
8 | data: ""
9 | events: []
10 | gas_used: "0"
11 | gas_wanted: "0"
12 | height: "0"
13 | info: ""
14 | logs: []
15 | raw_log: '[]'
16 | timestamp: ""
17 | tx: null
18 | txhash: 17A782264B94C963402765CEA6747AF6F3DA0819E564F271109E76EF7259818F'''
19 |
20 | ofile = open('blah.txt' ,'a+')
21 |
22 | ofile.write(ofilestr)
23 | ofile.flush()
24 | ofile.close()
25 | with open('blah.txt' ,'r+') as rfile:
26 | last_line = rfile.readlines()[-1]
27 | if 'txhash' in last_line:
28 | tx = last_line.split(':')[-1].rstrip().lstrip()
29 | print(tx)
30 |
31 | rfile.close()
--------------------------------------------------------------------------------
/tests/rv-card.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivy.utils import get_color_from_hex
3 | from kivy.properties import ListProperty, StringProperty
4 |
5 | from kivymd.color_definitions import colors
6 | from kivymd.uix.tab import MDTabsBase
7 | from kivymd.uix.boxlayout import MDBoxLayout
8 | from kivymd.uix.gridlayout import MDGridLayout
9 | from kivymd.uix.card import MDCard
10 |
11 |
12 | demo = '''
13 |
14 | orientation: 'vertical'
15 |
16 | MDToolbar:
17 | title: app.title
18 |
19 | MDTabs:
20 | id: android_tabs
21 | on_tab_switch: app.on_tab_switch(*args)
22 | size_hint_y: None
23 | height: "48dp"
24 | tab_indicator_anim: False
25 |
26 | RecycleView:
27 | id: rv
28 | key_viewclass: "viewclass"
29 | key_size: "height"
30 |
31 | RecycleBoxLayout:
32 | default_size: None, dp(48)
33 | default_size_hint: 1, None
34 | size_hint_y: None
35 | height: self.minimum_height
36 | orientation: "vertical"
37 |
38 |
39 |
40 | size_hint_y: None
41 | height: "42dp"
42 |
43 | MDLabel:
44 | text: root.text
45 | halign: "center"
46 |
47 |
48 |
49 |
50 |
51 | orientation: "vertical"
52 | height: node_box.height
53 | focus_behavior: True
54 | ripple_behavior: True
55 |
56 | moniker_text: "BLARGLY"
57 | moniker2_text: "GLARGLY"
58 | source_image: "CUNTS"
59 | BoxLayout:
60 | id: node_box
61 | size_hint_y: None
62 | height: "50dp"
63 |
64 | canvas:
65 | Rectangle:
66 | pos: self.pos
67 | size: self.size
68 |
69 | MDLabel:
70 | id: label_box
71 |
72 | text: root.moniker_text
73 | MDLabel:
74 | id: label_box
75 |
76 | text: root.moniker2_text
77 |
78 |
79 |
80 | MDSeparator:
81 |
82 |
83 |
84 | '''
85 |
86 | from kivy.factory import Factory
87 |
88 | from kivymd.app import MDApp
89 |
90 |
91 | class Tab(MDBoxLayout, MDTabsBase):
92 | pass
93 |
94 |
95 | class ItemColor(MDBoxLayout):
96 | text = StringProperty()
97 | color = ListProperty()
98 |
99 |
100 | class MD3Card(MDCard):
101 | moniker_text = StringProperty()
102 |
103 | class Palette(MDApp):
104 | title = "Colors definitions"
105 |
106 | def build(self):
107 | Builder.load_string(demo)
108 | self.screen = Factory.Root()
109 |
110 | for name_tab in colors.keys():
111 | tab = Tab(text=name_tab)
112 | self.screen.ids.android_tabs.add_widget(tab)
113 | return self.screen
114 |
115 | def on_tab_switch(
116 | self, instance_tabs, instance_tab, instance_tabs_label, tab_text
117 | ):
118 | self.screen.ids.rv.data = []
119 | if not tab_text:
120 | tab_text = 'Red'
121 | old_value_color = "SHITMYFfuck"
122 | for value_color in colors[tab_text]:
123 | from kivymd.uix.card import MDCard
124 | self.screen.ids.rv.data.append(
125 | {
126 | "viewclass": "MD3Card",
127 | "md_bg_color": get_color_from_hex(colors[tab_text][value_color]),
128 | "moniker_text": value_color,
129 | "moniker2_text" : old_value_color,
130 | "source_image" : "./src/cli/at.png"
131 |
132 | },
133 | )
134 | old_value_color = value_color
135 |
136 | def on_start(self):
137 | self.on_tab_switch(
138 | None,
139 | None,
140 | None,
141 | self.screen.ids.android_tabs.ids.layout.children[-1].text,
142 | )
143 |
144 |
145 | Palette().run()
146 |
--------------------------------------------------------------------------------
/tests/rv-stuff.py:
--------------------------------------------------------------------------------
1 | from kivymd.app import MDApp
2 | from kivy.lang import Builder
3 | from kivy.properties import StringProperty
4 | from kivy.uix.boxlayout import BoxLayout
5 | from kivy.uix.recycleview import RecycleView
6 | from kivy.uix.popup import Popup
7 | from kivymd.uix.card import MDCard
8 | from kivy.uix.image import Image
9 | Builder.load_string('''
10 | #:kivy 1.10.0
11 | #:import get_color_from_hex kivy.utils.get_color_from_hex
12 | <-FullImage>:
13 | canvas:
14 | Rectangle:
15 | texture: self.texture
16 | size: self.width, self.height
17 |
18 | <-FullImage2>:
19 | canvas:
20 | Rectangle:
21 | texture: self.texture
22 | size: self.width - 170, self.height -25
23 | pos: self.x + 80 , self.y
24 |
25 | :
26 | size_hint_y: None
27 | pos_hint: {"center_x": .5, "center_y": .5}
28 | orientation: "vertical"
29 | padding: 10
30 | border_radius: 20
31 | elevation:0
32 | md_bg_color: get_color_from_hex("#0d021b")
33 | MDGridLayout:
34 | cols: 1
35 | MDFloatLayout:
36 |
37 | MDLabel:
38 | text: "Schrodinger's Cat"
39 | theme_text_color: "Custom"
40 | font_style: "H6"
41 | font_size: "24sp"
42 | text_color: get_color_from_hex("#fcb711")
43 | pos_hint: {"x" : 0, "top" : 1.3}
44 | size_hint_x: None
45 | width: "200dp"
46 | Image:
47 | source: "../src/imgs/at.png"
48 | # {"x", "y", "top", "bottom", "left", "right" }
49 | pos_hint: {"x" : .3, "top" : 1 }
50 |
51 | MDLabel:
52 | text: "50.42 MB/s, 75.2 MB/s "
53 | theme_text_color: "Custom"
54 | font_style: "Subtitle2"
55 | font_size: "12sp"
56 | text_color: 1,1,1,1
57 | pos_hint: {"x" : .42 , "top": .9 }
58 | MDLabel:
59 | text: "Austria"
60 | theme_text_color: "Custom"
61 | font_style: "H6"
62 | font_size: "22sp"
63 | text_color: (1,1,1,1)
64 | pos_hint: {"right" : 1.75 , "top": 0 }
65 | MDLabel:
66 | text: "sentnode19887294712394719phfndkashfk"
67 | theme_text_color: "Custom"
68 | font_style: "Subtitle2"
69 | font_size: "10sp"
70 | text_color: (0/255.0,141/255.0,155/255.0,255/255.0)
71 | pos_hint: {"x" : 0, "top" : .85}
72 |
73 | MDGridLayout:
74 | cols: 3
75 | padding: 0,0,0,10
76 | MDLabel:
77 | text: "1000000udvpn/GB,10000utom,15000uosmo,10000000udec,10000uscrt"
78 | theme_text_color: "Custom"
79 | font_style: "Subtitle2"
80 | font_size: "13sp"
81 | text_color: get_color_from_hex("#fcb711")
82 | Image:
83 | source: "../src/imgs/fast.png"
84 | MDBoxLayout:
85 | padding: 80,30,0,0
86 |
87 |
88 | MDRaisedButton:
89 | text: "Get Details"
90 | md_bg_color: get_color_from_hex("#fcb711")
91 | text_color: 0,0,0,1
92 |
93 | MDSeparator:
94 | color: 1,1,1,1
95 |
96 | :
97 | viewclass: 'RecycleViewRow'
98 | RecycleGridLayout:
99 |
100 | cols:1
101 | default_size: dp(200), dp(150)
102 | default_size_hint: 1, None
103 | size_hint_y: None
104 | height: self.minimum_height
105 | orientation: 'lr-tb'
106 | ''')
107 |
108 | class FullImage(Image):
109 | pass
110 | class FullImage2(Image):
111 | pass
112 | class RecycleViewRow(MDCard):
113 | text = StringProperty()
114 |
115 | class MainScreen(RecycleView):
116 | def __init__(self, **kwargs):
117 | super(MainScreen, self).__init__(**kwargs)
118 | self.data = [{'text': "Button " + str(x), 'id': str(x)} for x in range(10)]
119 |
120 |
121 |
122 | class TestApp(MDApp):
123 | title = "RecycleView Direct Test"
124 |
125 | def build(self):
126 | return MainScreen()
127 |
128 | if __name__ == "__main__":
129 | TestApp().run()
--------------------------------------------------------------------------------
/tests/rv_card_swipe.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivy.properties import StringProperty
3 |
4 | from kivymd.app import MDApp
5 | from kivymd.uix.card import MDCardSwipe
6 |
7 | KV = '''
8 | #:import get_color_from_hex kivy.utils.get_color_from_hex
9 |
10 | :
11 | size_hint_y: None
12 | height: self.height
13 | type_swipe: "hand"
14 |
15 |
16 | MDCardSwipeLayerBox:
17 | padding: "8dp"
18 |
19 | MDIconButton:
20 | icon: "trash-can"
21 | pos_hint: {"center_y": .5}
22 | on_release: root.show_country_nodes(root.ids.country)
23 |
24 | MDCardSwipeFrontBox:
25 | md_bg_color: get_color_from_hex("#0d021b")
26 | MDGridLayout:
27 | cols: 1
28 | MDFloatLayout:
29 |
30 | MDLabel:
31 | text: "Schrodinger's Cat"
32 | theme_text_color: "Custom"
33 | font_style: "H6"
34 | font_size: "24sp"
35 | text_color: get_color_from_hex("#fcb711")
36 | pos_hint: {"x" : 0, "top" : 1.3}
37 | size_hint_x: None
38 | width: "200dp"
39 | Image:
40 | source: "../src/imgs/at.png"
41 | # {"x", "y", "top", "bottom", "left", "right" }
42 | pos_hint: {"x" : .3, "top" : 1 }
43 |
44 | MDLabel:
45 | id: country
46 | text: "50.42 MB/s, 75.2 MB/s "
47 | theme_text_color: "Custom"
48 | font_style: "Subtitle2"
49 | font_size: "12sp"
50 | text_color: 1,1,1,1
51 | pos_hint: {"x" : .42 , "top": .9 }
52 | MDLabel:
53 | text: "Austria"
54 | theme_text_color: "Custom"
55 | font_style: "H6"
56 | font_size: "22sp"
57 | text_color: (1,1,1,1)
58 | pos_hint: {"right" : 1.75 , "top": 0 }
59 | MDLabel:
60 | text: "sentnode19887294712394719phfndkashfk"
61 | theme_text_color: "Custom"
62 | font_style: "Subtitle2"
63 | font_size: "10sp"
64 | text_color: (0/255.0,141/255.0,155/255.0,255/255.0)
65 | pos_hint: {"x" : 0, "top" : .85}
66 |
67 | MDGridLayout:
68 | cols: 3
69 | padding: 0,0,0,10
70 | MDLabel:
71 | text: "1000000udvpn/GB,10000utom,15000uosmo,10000000udec,10000uscrt"
72 | theme_text_color: "Custom"
73 | font_style: "Subtitle2"
74 | font_size: "13sp"
75 | text_color: get_color_from_hex("#fcb711")
76 | Image:
77 | source: "../src/imgs/fast.png"
78 | MDBoxLayout:
79 | padding: 80,30,0,0
80 |
81 |
82 | MDRaisedButton:
83 | text: "Get Details"
84 | md_bg_color: get_color_from_hex("#fcb711")
85 | text_color: 0,0,0,1
86 |
87 | MDSeparator:
88 | color: 1,1,1,1
89 |
90 | MDScreen:
91 |
92 | MDBoxLayout:
93 | orientation: "vertical"
94 | spacing: "10dp"
95 |
96 | MDToolbar:
97 | elevation: 10
98 | title: "MDCardSwipe"
99 |
100 | ScrollView:
101 |
102 | MDList:
103 | id: md_list
104 | padding: 0
105 | '''
106 |
107 |
108 | class SwipeToDeleteItem(MDCardSwipe):
109 | text = StringProperty()
110 |
111 |
112 | class TestCard(MDApp):
113 | def __init__(self, **kwargs):
114 | super().__init__(**kwargs)
115 | self.screen = Builder.load_string(KV)
116 |
117 | def build(self):
118 | return self.screen
119 |
120 | def remove_item(self, instance):
121 | self.screen.ids.md_list.remove_widget(instance)
122 |
123 | def on_start(self):
124 | for i in range(20):
125 | self.screen.ids.md_list.add_widget(
126 | SwipeToDeleteItem(text=f"One-line item {i}")
127 | )
128 |
129 |
130 | TestCard().run()
--------------------------------------------------------------------------------
/tests/rv_select.py:
--------------------------------------------------------------------------------
1 | from kivy.app import App
2 | from kivy.lang import Builder
3 | from kivy.uix.recycleview import RecycleView
4 | from kivy.uix.recycleview.views import RecycleDataViewBehavior
5 | from kivy.uix.label import Label
6 | from kivy.properties import BooleanProperty
7 | from kivy.uix.recycleboxlayout import RecycleBoxLayout
8 | from kivy.uix.recyclegridlayout import RecycleGridLayout
9 | from kivy.uix.behaviors import FocusBehavior
10 | from kivy.uix.recycleview.layout import LayoutSelectionBehavior
11 |
12 | Builder.load_string('''
13 | :
14 | # Draw a background to indicate selection
15 | canvas.before:
16 | Color:
17 | rgba: (.0, 0.9, .1, .3) if self.selected else (0, 0, 0, 1)
18 | Rectangle:
19 | pos: self.pos
20 | size: self.size
21 | :
22 | viewclass: 'SelectableLabel'
23 | SelectableRecycleGridLayout:
24 | default_size: None, dp(56)
25 | default_size_hint: 1, None
26 | size_hint_y: None
27 | height: self.minimum_height
28 | orientation: 'tb-lr'
29 | multiselect: True
30 | touch_multiselect: True
31 | rows: 3
32 | cols: 4
33 |
34 | ''')
35 |
36 |
37 | items = [0, "apple", "dog", 1, "banana", "cat", 2, "pear", "rat", 3, "pineapple", "bat"]
38 |
39 | class SelectableRecycleGridLayout(FocusBehavior, LayoutSelectionBehavior,
40 | RecycleGridLayout):
41 | ''' Adds selection and focus behaviour to the view. '''
42 |
43 |
44 | class SelectableLabel(RecycleDataViewBehavior, Label):
45 | ''' Add selection support to the Label '''
46 | index = None
47 | selected = BooleanProperty(False)
48 | selectable = BooleanProperty(True)
49 |
50 | def refresh_view_attrs(self, rv, index, data):
51 | ''' Catch and handle the view changes '''
52 | self.index = index
53 | return super(SelectableLabel, self).refresh_view_attrs(
54 | rv, index, data)
55 |
56 | def on_touch_down(self, touch):
57 | ''' Add selection on touch down '''
58 | if super(SelectableLabel, self).on_touch_down(touch):
59 | return True
60 | if self.collide_point(*touch.pos) and self.selectable:
61 | return self.parent.select_with_touch(self.index, touch)
62 |
63 | def apply_selection(self, rv, index, is_selected):
64 | ''' Respond to the selection of items in the view. '''
65 | self.selected = is_selected
66 | if is_selected:
67 | print("selection changed to {0}".format(rv.data[index]))
68 | else:
69 | print("selection removed for {0}".format(rv.data[index]))
70 |
71 | class RV(RecycleView):
72 | def __init__(self, **kwargs):
73 | super(RV, self).__init__(**kwargs)
74 | self.data = [{'text': str(x)} for x in items]
75 |
76 |
77 | class TestApp(App):
78 | def build(self):
79 | return RV()
80 |
81 | if __name__ == '__main__':
82 | TestApp().run()
--------------------------------------------------------------------------------
/tests/seed_field.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivy.properties import StringProperty
3 |
4 | from kivymd.app import MDApp
5 | from kivymd.uix.relativelayout import MDRelativeLayout
6 | from kivymd.uix.textfield import MDTextFieldRect, MDTextField
7 | KV = '''
8 |
9 |
10 | :
11 | size_hint_y: None
12 | height: text_field.height
13 |
14 | MDTextField:
15 | id: text_field
16 | hint_text: root.hint_text
17 | text: root.text
18 | password: True
19 | icon_left: "key-variant"
20 | mode: "rectangle"
21 |
22 | MDIconButton:
23 | icon: "eye-off"
24 | pos_hint: {"center_y": .5}
25 | pos: text_field.width - self.width + dp(8), 0
26 | theme_text_color: "Hint"
27 | on_release:
28 | self.icon = "eye" if self.icon == "eye-off" else "eye-off"
29 | text_field.password = False if text_field.password is True else True
30 |
31 |
32 | MDScreen:
33 |
34 | ClickableTextFieldRound:
35 | size_hint_x: None
36 | width: "500dp"
37 | height: "100dp"
38 | hint_text: "Seed Phrase"
39 | pos_hint: {"center_x": .5, "center_y": .85}
40 | MDRaisedButton:
41 | id: restore_wallet_button
42 | text: "Restore"
43 | pos_hint: {"center_x": .5, "center_y": .5}
44 | on_press: root.restore_wallet_from_seed_phrase()
45 | '''
46 |
47 |
48 |
49 | class ClickableTextFieldRound(MDRelativeLayout):
50 | text = StringProperty()
51 | hint_text = StringProperty()
52 | # Here specify the required parameters for MDTextFieldRound:
53 | # [...]
54 |
55 |
56 | class Test(MDApp):
57 | def build(self):
58 | return Builder.load_string(KV)
59 |
60 |
61 | Test().run()
--------------------------------------------------------------------------------
/tests/speedparse.py:
--------------------------------------------------------------------------------
1 | #!/bin/env python3
2 |
3 | speedRate = []
4 | speed = "-124542424242010.28MB+13.25KB"
5 |
6 | speedAdj = speed.lstrip().rstrip().split('+')
7 |
8 | if "MB" in speedAdj[0]:
9 | speedRate.append("MB")
10 | elif "KB" in speedAdj[0]:
11 | speedRate.append("KB")
12 | else:
13 | speedRate.append("B")
14 |
15 | if "MB" in speedAdj[1]:
16 | speedRate.append("MB")
17 | elif "KB" in speedAdj[1]:
18 | speedRate.append("KB")
19 | else:
20 | speedRate.append("B")
21 |
22 |
23 | speedAdj[0] = speedAdj[0].replace('MB', '').replace('KB', '').replace('B', '')
24 | speedAdj[1] = speedAdj[1].replace('MB', '').replace('KB', '').replace('B', '')
25 |
26 | if float(speedAdj[0]) < 0:
27 | speedAdj[0] = 0
28 |
29 | if float(speedAdj[1]) < 0:
30 | speedAdj[1] = 0
31 |
32 | speed = str(speedAdj[0]) + speedRate[0] + "↓" + "," + str(speedAdj[1]) + speedRate[1] + "↑"
33 | print(speed)
34 |
35 |
36 |
--------------------------------------------------------------------------------
/tests/stripe_pay/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/stripe_pay/__init__.py
--------------------------------------------------------------------------------
/tests/stripe_pay/charge.py:
--------------------------------------------------------------------------------
1 | import stripe
2 |
3 | SECRET_KEY = "sk_test_yeFBfGlf3fIVT0VLqsbOMapP"
4 |
5 | stripe.api_key=SECRET_KEY
6 |
7 | class StripePayments():
8 | def generate_card_token(self, cardnumber,expmonth,expyear,cvv):
9 | data= stripe.Token.create(
10 | card={
11 | "number": str(cardnumber),
12 | "exp_month": int(expmonth),
13 | "exp_year": int(expyear),
14 | "cvc": str(cvv),
15 | })
16 | card_token = data['id']
17 |
18 | return card_token
19 |
20 |
21 | def create_payment_charge(self, tokenid,amount):
22 |
23 | payment = stripe.Charge.create(
24 | amount= int(float(amount)*100), # convert amount to cents
25 | currency='usd',
26 | description='Example charge',
27 | source=tokenid,
28 | )
29 |
30 | payment_check = payment # return True for payment
31 |
32 | return payment_check
33 |
34 |
--------------------------------------------------------------------------------
/tests/successfull_subscription.json:
--------------------------------------------------------------------------------
1 | {"height":"6235565","txhash":"DEC96F17ECDFAEFD2961E4B45C3CC1D37B67E064B15F68C0791008C6621BB912","codespace":"","code":0,"data":"0A350A332F73656E74696E656C2E737562736372697074696F6E2E76312E4D7367537562736372696265546F4E6F646552657175657374","raw_log":"[{\"events\":[{\"type\":\"coin_received\",\"attributes\":[{\"key\":\"receiver\",\"value\":\"sent1cwulk79y2t8zljgvlutqs5gzx4gruwmjsqzjju\"},{\"key\":\"amount\",\"value\":\"1000000udvpn\"}]},{\"type\":\"coin_spent\",\"attributes\":[{\"key\":\"spender\",\"value\":\"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4\"},{\"key\":\"amount\",\"value\":\"1000000udvpn\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"/sentinel.subscription.v1.MsgSubscribeToNodeRequest\"},{\"key\":\"sender\",\"value\":\"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4\"}]},{\"type\":\"sentinel.deposit.v1.EventAdd\",\"attributes\":[{\"key\":\"address\",\"value\":\"\\\"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4\\\"\"},{\"key\":\"coins\",\"value\":\"[{\\\"denom\\\":\\\"udvpn\\\",\\\"amount\\\":\\\"1000000\\\"}]\"}]},{\"type\":\"sentinel.subscription.v1.EventAddQuota\",\"attributes\":[{\"key\":\"id\",\"value\":\"\\\"58490\\\"\"},{\"key\":\"address\",\"value\":\"\\\"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4\\\"\"}]},{\"type\":\"sentinel.subscription.v1.EventSubscribe\",\"attributes\":[{\"key\":\"id\",\"value\":\"\\\"58490\\\"\"},{\"key\":\"node\",\"value\":\"\\\"sentnode1d3wd693rqsml3vsfwrl25pn5gzy43hwxn9ctpm\\\"\"},{\"key\":\"plan\",\"value\":\"\\\"0\\\"\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"sent1cwulk79y2t8zljgvlutqs5gzx4gruwmjsqzjju\"},{\"key\":\"sender\",\"value\":\"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4\"},{\"key\":\"amount\",\"value\":\"1000000udvpn\"}]}]}]","logs":[{"msg_index":0,"log":"","events":[{"type":"coin_received","attributes":[{"key":"receiver","value":"sent1cwulk79y2t8zljgvlutqs5gzx4gruwmjsqzjju"},{"key":"amount","value":"1000000udvpn"}]},{"type":"coin_spent","attributes":[{"key":"spender","value":"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4"},{"key":"amount","value":"1000000udvpn"}]},{"type":"message","attributes":[{"key":"action","value":"/sentinel.subscription.v1.MsgSubscribeToNodeRequest"},{"key":"sender","value":"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4"}]},{"type":"sentinel.deposit.v1.EventAdd","attributes":[{"key":"address","value":"\"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4\""},{"key":"coins","value":"[{\"denom\":\"udvpn\",\"amount\":\"1000000\"}]"}]},{"type":"sentinel.subscription.v1.EventAddQuota","attributes":[{"key":"id","value":"\"58490\""},{"key":"address","value":"\"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4\""}]},{"type":"sentinel.subscription.v1.EventSubscribe","attributes":[{"key":"id","value":"\"58490\""},{"key":"node","value":"\"sentnode1d3wd693rqsml3vsfwrl25pn5gzy43hwxn9ctpm\""},{"key":"plan","value":"\"0\""}]},{"type":"transfer","attributes":[{"key":"recipient","value":"sent1cwulk79y2t8zljgvlutqs5gzx4gruwmjsqzjju"},{"key":"sender","value":"sent1hfkgxzrkhxdxdwjy8d74jhc4dcw5e9zm7vfzh4"},{"key":"amount","value":"1000000udvpn"}]}]}],"info":"","gas_wanted":"200000","gas_used":"86232","tx":null,"timestamp":""}
2 |
3 |
--------------------------------------------------------------------------------
/tests/timestamp.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 |
3 | FORMAT = '%Y-%m-%d.%H:%M:%S'
4 |
5 | print(datetime.now().strftime(FORMAT))
--------------------------------------------------------------------------------
/tests/toolbar.py:
--------------------------------------------------------------------------------
1 | from kivy.lang import Builder
2 | from kivymd.theming import ThemeManager
3 | from kivymd.app import MDApp
4 | from kivy.uix.boxlayout import BoxLayout
5 | from kivy.properties import ObjectProperty
6 |
7 |
8 |
9 | KV = '''
10 | MyLayout:
11 |
12 | # Will always be at the bottom of the screen.
13 | MDBottomAppBar:
14 |
15 | MDToolbar:
16 | title: "Title"
17 | icon: "git"
18 | type: "bottom"
19 | left_action_items: [["menu", lambda x: x]]
20 | ScreenManager:
21 | id: scr_mngr
22 | Screen:
23 | name: 'screen1'
24 | Toolbar:
25 | title: "Screen 1"
26 | Screen:
27 | name: 'screen2'
28 | Toolbar:
29 | title: "Screen 2"
30 | '''
31 |
32 | class MyLayout(BoxLayout):
33 |
34 | scr_mngr = ObjectProperty(None)
35 |
36 | def change_screen(self, screen, *args):
37 | self.scr_mngr.current = screen
38 |
39 |
40 |
41 | class Test(MDApp):
42 | theme_cls = ThemeManager()
43 |
44 | def build(self):
45 | return Builder.load_string(KV)
46 |
47 |
48 | Test().run()
--------------------------------------------------------------------------------
/tests/tree/continents.py:
--------------------------------------------------------------------------------
1 | import awoc
2 |
3 | class OurWorld():
4 | our_world = awoc.AWOC()
5 |
6 | CONTINENTS = our_world.get_continents_list()
7 | Africa = our_world.get_countries_list_of(CONTINENTS[0])
8 | Anarctica = our_world.get_countries_list_of(CONTINENTS[1])
9 | Asia = our_world.get_countries_list_of(CONTINENTS[2])
10 | Europe = our_world.get_countries_list_of(CONTINENTS[3])
11 | NorthAmerica = our_world.get_countries_list_of(CONTINENTS[4])
12 | Oceania = our_world.get_countries_list_of(CONTINENTS[5])
13 | SouthAmerica = our_world.get_countries_list_of(CONTINENTS[6])
14 |
--------------------------------------------------------------------------------
/tests/v2/uix/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MathNodes/meile-gui/226971299b062f911c17d4b200c531af6a4e0d9c/tests/v2/uix/__init__.py
--------------------------------------------------------------------------------
/tests/win.py:
--------------------------------------------------------------------------------
1 |
2 | class WindowNames():
3 | WALLET_RESTORE = "walletrestore"
4 | MAIN_WINDOW = "main"
5 | PRELOAD = "preload"
6 |
7 |
8 | class CoinsList():
9 | SATOSHI = 1000000
10 | ibc_mu_coins = ["udvpn", "uscrt", "uosmo", "uatom", "udec"]
11 | ibc_coins = { "dvpn" : "udvpn", "scrt" : "uscrt", "osmo": "usosmo", "atom" : "uatom", "dec" : "udec"}
--------------------------------------------------------------------------------
/tests/worlds_czechia.py:
--------------------------------------------------------------------------------
1 | from continents import OurWorld
2 |
3 | C = "Czechia"
4 | D = "Seychelles"
5 | if C == "Czechia":
6 | C = "Czech Republic"
7 | print(OurWorld.our_world.get_country_ISO2(C))
8 |
9 | print(OurWorld.our_world.get_country_ISO2(D))
--------------------------------------------------------------------------------