This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from haizaar/master
Fixes to re-connect logic
- Loading branch information
Showing
30 changed files
with
3,265 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.o | ||
*.DS_Store | ||
*.log | ||
cachegrind.out.* | ||
callgrind.out.* | ||
massif.out.* | ||
memcheck.out | ||
tcproxy | ||
core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
2011-06-2 Release 0.2.2 | ||
* fix a bug that causes infinit loop when process write | ||
|
||
2011-05-21 Release 0.2.1 | ||
* fix ip address parse bug | ||
|
||
2011-05-20 Release 0.2 | ||
* nonblock connect implemented | ||
* semicolon bind to address not port now | ||
* some performance optimization | ||
* some bugfix | ||
|
||
2011-05-18 Release 0.1.1 | ||
* -l option added to write log file | ||
* minor code refinement | ||
|
||
2011-05-16 Release 0.1 | ||
* first public beta release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Copyright dccmx. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to | ||
deal in the Software without restriction, including without limitation the | ||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | ||
sell copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS | ||
IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# tcproxy - Makefile | ||
# | ||
# Author: dccmx <dccmx@dccmx.com> | ||
# | ||
|
||
default: all | ||
|
||
.DEFAULT: | ||
cd src && $(MAKE) $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
**Copied from https://github.com/dccmx/tcproxy.git. Used for connection issues simulation.** | ||
|
||
tcproxy | ||
======= | ||
tcproxy is a small efficient tcp proxy that can be used for port forwarding or load balancing. | ||
|
||
sample usage | ||
------------ | ||
tcproxy "11212 -> 11211" | ||
tcproxy "192.168.0.1:11212 -> 192.168.0.2:11211" | ||
|
||
not implemented yet | ||
--------------- | ||
tcproxy "any:11212 -> rr{192.168.0.100:11211 192.168.0.101:11211 192.168.0.102:11211}" | ||
tcproxy "any:11212 -> hash{192.168.0.100:11211 192.168.0.101:11211 192.168.0.102:11211}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
failover | ||
tcp pool | ||
thread | ||
|
||
tcproxy "any:11212\ | ||
<-> rr{\ | ||
192.168.0.100:11211 -> 192.168.0.100:11212\ | ||
192.168.0.101:11211\ | ||
192.168.0.102:11211}\ | ||
-> 192.168.0.103:11211" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
PROGNAME = tcproxy | ||
|
||
OBJS = tcproxy.o ae.o util.o policy.o zmalloc.o anet.o | ||
|
||
CFLAGS_GEN = -Wall -Werror -g $(CFLAGS) | ||
CFLAGS_DBG = -ggdb $(CFLAGS_GEN) | ||
CFLAGS_OPT = -O3 -Wno-format $(CFLAGS_GEN) | ||
DEBUG ?= | ||
|
||
CCCOLOR="\033[34m" | ||
LINKCOLOR="\033[34;1m" | ||
SRCCOLOR="\033[33m" | ||
BINCOLOR="\033[37;1m" | ||
MAKECOLOR="\033[32;1m" | ||
ENDCOLOR="\033[0m" | ||
|
||
QUIET_CC = @printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$@$(ENDCOLOR); | ||
QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR); | ||
|
||
LDFLAGS += | ||
LIBS += | ||
|
||
all: $(PROGNAME) | ||
|
||
%.o: %.c | ||
$(QUIET_CC)$(CC) -c $(CFLAGS) $(CFLAGS_OPT) $(DEBUG) $(COMPILE_TIME) $< | ||
|
||
$(PROGNAME): $(OBJS) | ||
$(QUIET_LINK)$(CC) -o $(PROGNAME) $(CFLAGS_OPT) $(DEBUG) $(OBJS) $(CCLINK) | ||
@echo | ||
@echo "Make Complete. Read README for how to use." | ||
@echo | ||
@echo "Having problems with it? Send complains and bugs to dccmx@dccmx.com" | ||
@echo | ||
|
||
clean: | ||
rm -f $(PROGNAME) core core.[1-9][0-9]* *.o memcheck.out callgrind.out.[1-9][0-9]* massif.out.[1-9][0-9]* |
Oops, something went wrong.