Comments (4)
hi @jjhatobjective , the portproxy
which you used will insert the sql query
to the conf.backend, you should import the table query_log to your database that record the sql query.
note: portproxy only used in test environments.
from portproxy.
@jjhatobjective , you can test with the latest version. I have skip error when the conf
option is not set.
from portproxy.
That is able to start the proxy now however it looks like the flags arent being read by the application and the defaults are being used in place
[root@dev-server ~]# ./portproxy backend=mysql.server.net:3306 -bind="8003" -buffer=4096 -daemon=false -logTo=stdout
2020/04/23 23:06:57 Can't get config info, skip insert log to mysql...
2020/04/23 23:06:57 portproxy started.
2020/04/23 23:07:46 client: 127.0.0.1:47488 ==> 127.0.0.1:8002
2020/04/23 23:07:46 dial tcp 127.0.0.1:8003: connect: connection refused
I did some experimenting with a pointer instead of a StringVar but still the flag inpput is not being parsed, Changing the default value works however.
//flag.StringVar(&bind, "bind", ":8002", "locate ip and port")
BindPtr := flag.String("bind", ":8003", "locate ip and port"
p := New(*BindPtr, backend, uint32(buffer))
log.Println("portproxy started.")
go p.Start()
waitSignal()
tcp6 0 0 :::8003 :::* LISTEN 25763/portproxy
I havent seen this before, it appears to not be accepting cli flags :/
from portproxy.
@arstercz nevermind I was missing a - on my backend flag, everything is working now, thanks for your help.
from portproxy.
Related Issues (3)
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 portproxy.