Comments (9)
Yes, standard interfaces are fully available to you, and you can call readTextFile
from your plugin's main class to read any file in configs
directory, like it is used here.
Didn't really think of a way to obtain configuration directory at runtime, I will add a method for that in the next version, you can just hardcode it at the moment.
from powertunnel-android.
Yes, standard interfaces are fully available to you, and you can call
readTextFile
from your plugin's main class to read any file inconfigs
directory, like it is used here.Didn't really think of a way to obtain configuration directory at runtime, I will add a method for that in the next version, you can just hardcode it at the moment.
oh okay okay thanks, and, can you make Error Messagebox for Plugins please
from powertunnel-android.
example, if user didnt put anything at user input, it will show error messagebox on android, or when user press start button, the app wil show error message
from powertunnel-android.
Yes, standard interfaces are fully available to you, and you can call
readTextFile
from your plugin's main class to read any file inconfigs
directory, like it is used here.Didn't really think of a way to obtain configuration directory at runtime, I will add a method for that in the next version, you can just hardcode it at the moment.
oh yeah, btw, i mean like file user interface, so user can select the file
from powertunnel-android.
example, if user didnt put anything at user input, it will show error messagebox on android, or when user press start button, the app wil show error message
You can throw an exception and its message will be shown to user
oh yeah, btw, i mean like file user interface, so user can select the file
I intended this as a tool primarily for an advanced users, but I'll consider adding such feature.
If you a built-in text file editor, you can declare additional config files in plugin manifest like this, and then long-press a gear in plugin list to access it.
from powertunnel-android.
You can throw an exception and its message will be shown to user
Sorry, can you make the example code?
Thanks
from powertunnel-android.
public class MyPlugin extends PowerTunnelPlugin {
@Override
public void onProxyInitialization(@NotNull ProxyServer proxy) {
// ...
if (somethingIsWrong) {
throw new Exception("Error message");
}
// ...
}
}
from powertunnel-android.
ohh okay okay, and it will show the dialog error?
from powertunnel-android.
okay okay thanks
from powertunnel-android.
Related Issues (20)
- App crashed when i add my own Plugin HOT 27
- Network connction broken when restart VPN from EMM API HOT 1
- unable to build as there is an error in file tun2http.c at line 174
- question - multi proxies possible? HOT 2
- Bug - failed to start and crashed HOT 18
- PowerTunnel v2.6 ~ 2.6.3 Force Close on Redmi 4A HOT 4
- PowerTunnel sometimes not working after Android 12 HOT 10
- How to use SOCKS5 proxy in PowerTunnel v2.6.3 ? HOT 3
- [ REQUESTS ] Allow Load Blacklist and Adblock From Local Storage HOT 1
- LittleProxy-MITM guidance HOT 1
- request a feature HOT 6
- Anyway to forcefully use Mobile (Cellular) data?
- high cpu usage
- [Feature Requests] IP and ARP spoofing
- Vproxid can support multiple upstream proxy servers. It is hoped that powertunnel and vproxid can complement each other.
- DNS Leaking
- add to f-droid HOT 1
- My operator blocks most DNS servers.
- SNI Bug: A large number of websites are inaccessible HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powertunnel-android.