mirror of
https://github.com/haad/proxychains
synced 2026-06-08 14:30:41 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9aff5523a4 |
@@ -1,24 +0,0 @@
|
|||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Run command
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: ''
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
name: Makefile CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-linux-ubuntu:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: configure
|
|
||||||
run: ./configure
|
|
||||||
|
|
||||||
- name: Build Proxychains
|
|
||||||
run: make
|
|
||||||
|
|
||||||
- name: Run Proxychains
|
|
||||||
run: ./proxychains4 -v
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: ./src/proxychains -f dist/proxychains.conf on
|
|
||||||
|
|
||||||
# - name: Run tests
|
|
||||||
# run: ./src/proxychains -f dist/proxychains.conf curl -o /dev/null -v https://sme.sk
|
|
||||||
|
|
||||||
# - name: Run tests
|
|
||||||
# run: ./src/proxychains -f dist/proxychains.conf ping -c 1 sme.sk
|
|
||||||
build-macos:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: configure
|
|
||||||
run: ./configure
|
|
||||||
|
|
||||||
- name: Build Proxychains
|
|
||||||
run: make
|
|
||||||
|
|
||||||
- name: Run Proxychains
|
|
||||||
run: ./proxychains4 -v
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: ./src/proxychains -f dist/proxychains.conf on
|
|
||||||
|
|
||||||
# - name: Run tests
|
|
||||||
# run: ./src/proxychains -f dist/proxychains.conf curl -o /dev/null -v https://sme.sk
|
|
||||||
|
|
||||||
# - name: Run tests
|
|
||||||
# run: ./src/proxychains -f dist/proxychains.conf ping -t 1 sme.sk
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
|
||||||
#
|
|
||||||
# You can adjust the behavior by modifying this file.
|
|
||||||
# For more information, see:
|
|
||||||
# https://github.com/actions/stale
|
|
||||||
name: Mark stale issues and pull requests
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '24 3 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stale:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/stale@v5
|
|
||||||
with:
|
|
||||||
days-before-stale: 90
|
|
||||||
days-before-close: 120
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
stale-issue-message: 'Stale issue message'
|
|
||||||
stale-pr-message: 'Stale pull request message'
|
|
||||||
stale-issue-label: 'no-issue-activity'
|
|
||||||
exempt-issue-labels: 'docu,roadmap,bug,possible-feature'
|
|
||||||
stale-pr-label: 'no-pr-activity'
|
|
||||||
exempt-pr-labels: 'feature'
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
# This workflow executes several linters on changed files based on languages used in your code base whenever
|
|
||||||
# you push a code or open a pull request.
|
|
||||||
#
|
|
||||||
# You can adjust the behavior by modifying this file.
|
|
||||||
# For more information, see:
|
|
||||||
# https://github.com/github/super-linter
|
|
||||||
name: Lint Code Base
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
jobs:
|
|
||||||
run-lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
# Full git history is needed to get a proper list of changed files within `super-linter`
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Lint Code Base
|
|
||||||
uses: github/super-linter@v4
|
|
||||||
env:
|
|
||||||
VALIDATE_ALL_CODEBASE: false
|
|
||||||
DEFAULT_BRANCH: "master"
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
# Enable C support
|
||||||
|
language: c
|
||||||
|
|
||||||
|
# OS selection
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
|
||||||
|
# Compiler selection
|
||||||
|
compiler:
|
||||||
|
- clang
|
||||||
|
- gcc
|
||||||
|
# Build steps
|
||||||
|
script:
|
||||||
|
- ./configure
|
||||||
|
- make
|
||||||
@@ -8,7 +8,7 @@ rofl0r.
|
|||||||
https://github.com/rofl0r/proxychains
|
https://github.com/rofl0r/proxychains
|
||||||
|
|
||||||
localnet, bugfixes, macos x support, bsd support, packaging
|
localnet, bugfixes, macos x support, bsd support, packaging
|
||||||
haad.
|
adam hamsik.
|
||||||
https://github.com/haad/proxychains
|
https://github.com/haad/proxychains
|
||||||
|
|
||||||
localnet-port, bugfixes
|
localnet-port, bugfixes
|
||||||
|
|||||||
@@ -9,11 +9,9 @@ prefix = /usr/local
|
|||||||
includedir = $(prefix)/include
|
includedir = $(prefix)/include
|
||||||
libdir = $(prefix)/lib
|
libdir = $(prefix)/lib
|
||||||
confdir = $(prefix)/etc
|
confdir = $(prefix)/etc
|
||||||
datadir = $(prefix)/share
|
|
||||||
|
|
||||||
exec_prefix = $(prefix)
|
exec_prefix = $(prefix)
|
||||||
bindir = $(exec_prefix)/bin
|
bindir = $(exec_prefix)/bin
|
||||||
zshcompdir = $(datadir)/zsh/site-functions
|
|
||||||
|
|
||||||
SRCS = $(sort $(wildcard src/*.c))
|
SRCS = $(sort $(wildcard src/*.c))
|
||||||
OBJS = $(SRCS:.c=.o)
|
OBJS = $(SRCS:.c=.o)
|
||||||
@@ -27,11 +25,14 @@ PIC = -fPIC
|
|||||||
AR = $(CROSS_COMPILE)ar
|
AR = $(CROSS_COMPILE)ar
|
||||||
RANLIB = $(CROSS_COMPILE)ranlib
|
RANLIB = $(CROSS_COMPILE)ranlib
|
||||||
|
|
||||||
|
LDSO_SUFFIX = so
|
||||||
LD_SET_SONAME = -Wl
|
LD_SET_SONAME = -Wl
|
||||||
INSTALL_FLAGS = -D -m
|
INSTALL_FLAGS = -D -m
|
||||||
|
|
||||||
-include config.mak
|
-include config.mak
|
||||||
|
|
||||||
|
LDSO_PATHNAME = libproxychains4.$(LDSO_SUFFIX)
|
||||||
|
|
||||||
SHARED_LIBS = $(LDSO_PATHNAME)
|
SHARED_LIBS = $(LDSO_PATHNAME)
|
||||||
ALL_LIBS = $(SHARED_LIBS)
|
ALL_LIBS = $(SHARED_LIBS)
|
||||||
PXCHAINS = proxychains4
|
PXCHAINS = proxychains4
|
||||||
@@ -42,35 +43,18 @@ LDFLAGS+=$(USER_LDFLAGS) $(OS_LDFLAGS)
|
|||||||
CXXFLAGS+=$(CCFLAGS) $(USER_CFLAGS) $(OS_CFLAGS)
|
CXXFLAGS+=$(CCFLAGS) $(USER_CFLAGS) $(OS_CFLAGS)
|
||||||
CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" -DINSTALL_PREFIX=\"$(prefix)\" -DDLL_NAME=\"$(LDSO_PATHNAME)\" -DSYSCONFDIR=\"$(confdir)\"
|
CFLAGS_MAIN=-DLIB_DIR=\"$(libdir)\" -DINSTALL_PREFIX=\"$(prefix)\" -DDLL_NAME=\"$(LDSO_PATHNAME)\" -DSYSCONFDIR=\"$(confdir)\"
|
||||||
|
|
||||||
UNAME_S := $(shell uname -s)
|
|
||||||
ifeq ($(UNAME_S),Linux)
|
|
||||||
LDSO_PATHNAME = libproxychains.$(LDSO_SUFFIX)
|
|
||||||
LDSO_SUFFIX = so.4
|
|
||||||
endif
|
|
||||||
ifeq ($(UNAME_S),Darwin)
|
|
||||||
LDSO_PATHNAME = libproxychains4.$(LDSO_SUFFIX)
|
|
||||||
LDSO_SUFFIX = dylib
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
all: $(ALL_LIBS) $(ALL_TOOLS)
|
all: $(ALL_LIBS) $(ALL_TOOLS)
|
||||||
|
|
||||||
#install: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(DESTDIR)$(LDSO_PATHNAME)
|
#install: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(DESTDIR)$(LDSO_PATHNAME)
|
||||||
install: install-exec install-config install-zsh-completion
|
install:
|
||||||
|
|
||||||
install-exec:
|
|
||||||
install -d $(DESTDIR)/$(bindir) $(DESTDIR)/$(libdir) $(DESTDIR)/$(confdir) $(DESTDIR)/$(includedir)
|
install -d $(DESTDIR)/$(bindir) $(DESTDIR)/$(libdir) $(DESTDIR)/$(confdir) $(DESTDIR)/$(includedir)
|
||||||
install $(INSTALL_FLAGS) 755 $(ALL_TOOLS) src/proxychains src/proxyresolv $(DESTDIR)/$(bindir)/
|
install $(INSTALL_FLAGS) 755 $(ALL_TOOLS) $(DESTDIR)/$(bindir)/
|
||||||
install $(INSTALL_FLAGS) 644 $(ALL_LIBS) $(DESTDIR)/$(libdir)/
|
install $(INSTALL_FLAGS) 644 $(ALL_LIBS) $(DESTDIR)/$(libdir)/
|
||||||
|
|
||||||
install-config:
|
install-config:
|
||||||
install -d $(DESTDIR)/$(confdir)
|
install -d $(DESTDIR)/$(confdir)
|
||||||
install $(INSTALL_FLAGS) 644 src/proxychains.conf $(DESTDIR)/$(confdir)/
|
install $(INSTALL_FLAGS) 644 src/proxychains.conf $(DESTDIR)/$(confdir)/
|
||||||
|
|
||||||
install-zsh-completion:
|
|
||||||
install -d $(DESTDIR)/$(zshcompdir)
|
|
||||||
install $(INSTALL_FLAGS) 644 completions/zsh/_proxychains4 -t $(DESTDIR)/$(zshcompdir)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(ALL_LIBS)
|
rm -f $(ALL_LIBS)
|
||||||
rm -f $(ALL_TOOLS)
|
rm -f $(ALL_TOOLS)
|
||||||
@@ -86,6 +70,6 @@ $(LDSO_PATHNAME): $(LOBJS)
|
|||||||
$(ALL_TOOLS): $(OBJS)
|
$(ALL_TOOLS): $(OBJS)
|
||||||
$(CC) src/main.o src/common.o -o $(PXCHAINS)
|
$(CC) src/main.o src/common.o -o $(PXCHAINS)
|
||||||
|
|
||||||
.PHONY: all clean install install-exec install-config install-zsh-completion
|
.PHONY: all clean install install-config
|
||||||
|
|
||||||
-include $(DEPS)
|
-include $(DEPS)
|
||||||
|
|||||||
+45
-52
@@ -1,7 +1,6 @@
|
|||||||
# ProxyChains ver. 4.3.0 README
|
= ProxyChains ver. 4.3.0 README
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
image:https://travis-ci.org/haad/proxychains.svg?branch=master["Build Status", link="https://travis-ci.org/haad/proxychains"]
|
||||||
|
|
||||||
ProxyChains is a UNIX program, that hooks network-related libc functions
|
ProxyChains is a UNIX program, that hooks network-related libc functions
|
||||||
in dynamically linked programs via a preloaded DLL and redirects the
|
in dynamically linked programs via a preloaded DLL and redirects the
|
||||||
@@ -11,12 +10,12 @@ WARNING: this program works only on dynamically linked programs.
|
|||||||
also both proxychains and the program to call must use
|
also both proxychains and the program to call must use
|
||||||
the same dynamic linker (i.e. same libc)
|
the same dynamic linker (i.e. same libc)
|
||||||
|
|
||||||
## Known limitations of the current version
|
== Known limitations of the current version
|
||||||
|
|
||||||
when a process forks, does a DNS lookup in the child, and then uses
|
when a process forks, does a DNS lookup in the child, and then uses
|
||||||
the ip in the parent, the corresponding ip mapping will not be found,
|
the ip in the parent, the corresponding ip mapping will not be found,
|
||||||
this is because the fork can't write back into the parents mapping table.
|
this is because the fork can't write back into the parents mapping table.
|
||||||
IRSSI shows this behavior, so you have to pass the resolved ip address
|
IRSSI shows this behaviour, so you have to pass the resolved ip address
|
||||||
to it. (you can use the proxyresolv script (requires "dig") to do so)
|
to it. (you can use the proxyresolv script (requires "dig") to do so)
|
||||||
|
|
||||||
this means that you can't currently use tor onion urls for irssi.
|
this means that you can't currently use tor onion urls for irssi.
|
||||||
@@ -26,13 +25,13 @@ shm_open, mkstemp, are possible candidates for a file based approach,
|
|||||||
the other option is to spawn some kind of server process that manages the
|
the other option is to spawn some kind of server process that manages the
|
||||||
map lookups. since connect() etc are hooked, this must not be a TCP server.
|
map lookups. since connect() etc are hooked, this must not be a TCP server.
|
||||||
|
|
||||||
I am reluctant on doing this change, because the described behavior
|
I am reluctant on doing this change, because the described behaviour
|
||||||
seems pretty idiotic (doing a fork only for a DNS lookup), and irssi
|
seems pretty idiotic (doing a fork only for a DNS lookup), and irssi
|
||||||
is currently the only known affected program.
|
is currently the only known affected program.
|
||||||
|
|
||||||
## Installation
|
== Installation
|
||||||
|
|
||||||
### Using release version
|
=== Using release version
|
||||||
|
|
||||||
*Proxychains-4.3.0* are available with pkgsrc to everyone using it on _Linux_,
|
*Proxychains-4.3.0* are available with pkgsrc to everyone using it on _Linux_,
|
||||||
_NetBSD_, _FreeBSD_, _OpenBSD_, _DragonFlyBSD_ or _Mac OS X_. You just need to install
|
_NetBSD_, _FreeBSD_, _OpenBSD_, _DragonFlyBSD_ or _Mac OS X_. You just need to install
|
||||||
@@ -41,28 +40,28 @@ pkgsrc-wip repository and run
|
|||||||
in a wip/proxychains directory.
|
in a wip/proxychains directory.
|
||||||
|
|
||||||
You can find out more about pkgsrc on link:http://www.pkgsrc.org[pkgsrc] and about pkgsrc-wip on
|
You can find out more about pkgsrc on link:http://www.pkgsrc.org[pkgsrc] and about pkgsrc-wip on
|
||||||
link:https://pkgsrc.org/wip[Pkgsrc-wip homepage]
|
link:http://pkgsrc-wip.sourceforge.net[Pkgsrc-wip homepage]
|
||||||
|
|
||||||
### Installing on Mac OS X with homebrew
|
=== Installing on Mac OS X with homebrew
|
||||||
|
|
||||||
You can install current proxychains on Mac OS X with an homebrew. You have to
|
You can install current proxychains on Mac OS X with an homebrew. You have to
|
||||||
download unofficial link:https://gist.github.com/3792521[homebrew formula] from
|
download unofficial link:https://gist.github.com/3792521[homebrew formula] from
|
||||||
to your BREW_HOME by default /usr/local/Library/Formula/ and run
|
to your BREW_HOME by default /usr/local/Library/Formula/ and run
|
||||||
|
|
||||||
```
|
----
|
||||||
$ brew install proxychains
|
$ brew install proxychains
|
||||||
```
|
----
|
||||||
|
|
||||||
### Running Current Source code version
|
=== Running Current Source code version
|
||||||
|
|
||||||
```
|
----
|
||||||
# needs a working C compiler, preferably gcc
|
# needs a working C compiler, preferably gcc
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
```
|
----
|
||||||
|
|
||||||
## Changelog
|
== Changelog
|
||||||
|
|
||||||
*Version (4.x)* removes the dnsresolver script which required a dynamically
|
*Version (4.x)* removes the dnsresolver script which required a dynamically
|
||||||
linked "dig" binary to be present with remote DNS lookup.
|
linked "dig" binary to be present with remote DNS lookup.
|
||||||
@@ -80,28 +79,24 @@ it supports SOCKS4, SOCKS5 and HTTP CONNECT proxy servers.
|
|||||||
** socks - "user/pass",
|
** socks - "user/pass",
|
||||||
** http - "basic"
|
** http - "basic"
|
||||||
|
|
||||||
## When to use it
|
== When to use it
|
||||||
|
|
||||||
* When the only way to get "outside" from your LAN is through proxy server.
|
* When the only way to get "outside" from your LAN is through proxy server.
|
||||||
* To get out from behind restrictive firewall which filters outgoing ports.
|
* To get out from behind restrictive firewall which filters outgoing ports.
|
||||||
* To use two (or more) proxies in chain:
|
* To use two (or more) proxies in chain:
|
||||||
|
----
|
||||||
```
|
|
||||||
like: your_host <--> proxy1 <--> proxy2 <--> target_host
|
like: your_host <--> proxy1 <--> proxy2 <--> target_host
|
||||||
```
|
----
|
||||||
|
|
||||||
* To "proxify" some program with no proxy support built-in (like telnet)
|
* To "proxify" some program with no proxy support built-in (like telnet)
|
||||||
* Access intranet from outside via proxy.
|
* Access intranet from outside via proxy.
|
||||||
* To use DNS behind proxy.
|
* To use DNS behind proxy.
|
||||||
|
|
||||||
### Some cool features
|
=== Some cool features
|
||||||
|
|
||||||
* This program can mix different proxy types in the same chain
|
* This program can mix different proxy types in the same chain
|
||||||
|
----
|
||||||
```
|
|
||||||
like: your_host <-->socks5 <--> http <--> socks4 <--> target_host
|
like: your_host <-->socks5 <--> http <--> socks4 <--> target_host
|
||||||
```
|
----
|
||||||
|
|
||||||
* Different chaining options supported
|
* Different chaining options supported
|
||||||
random order from the list ( user defined length of chain ).
|
random order from the list ( user defined length of chain ).
|
||||||
exact order (as they appear in the list )
|
exact order (as they appear in the list )
|
||||||
@@ -109,20 +104,18 @@ it supports SOCKS4, SOCKS5 and HTTP CONNECT proxy servers.
|
|||||||
* You can use it with any TCP client application, even network scanners
|
* You can use it with any TCP client application, even network scanners
|
||||||
yes, yes - you can make portscan via proxy (or chained proxies)
|
yes, yes - you can make portscan via proxy (or chained proxies)
|
||||||
for example with Nmap scanner by fyodor (www.insecure.org/nmap).
|
for example with Nmap scanner by fyodor (www.insecure.org/nmap).
|
||||||
|
----
|
||||||
```
|
|
||||||
proxychains nmap -sT -PO -p 80 -iR (find some webservers through proxy)
|
proxychains nmap -sT -PO -p 80 -iR (find some webservers through proxy)
|
||||||
```
|
----
|
||||||
|
|
||||||
* You can use it with servers, like squid, sendmail, or whatever.
|
* You can use it with servers, like squid, sendmail, or whatever.
|
||||||
* DNS resolving through proxy.
|
* DNS resolving through proxy.
|
||||||
|
|
||||||
## Configuration
|
== Configuration
|
||||||
|
|
||||||
proxychains looks for configuration in the following order:
|
proxychains looks for configuration in the following order:
|
||||||
|
|
||||||
* SOCKS5 proxy host ip and port in environment variable ${PROXYCHAINS_SOCKS5_HOST} ${PROXYCHAINS_SOCKS5_PORT}
|
* SOCKS5 proxy port in environment variable ${PROXYCHAINS_SOCKS5}
|
||||||
(if ${PROXYCHAINS_SOCKS5_PORT} is set, no further configuration will be searched. if ${PROXYCHAINS_SOCKS5_HOST} isn't set, host ip will become "127.0.0.1")
|
(if set, no further configuration will be searched)
|
||||||
* file listed in environment variable ${PROXYCHAINS_CONF_FILE} or
|
* file listed in environment variable ${PROXYCHAINS_CONF_FILE} or
|
||||||
provided as a -f argument to proxychains script or binary.
|
provided as a -f argument to proxychains script or binary.
|
||||||
* ./proxychains.conf
|
* ./proxychains.conf
|
||||||
@@ -131,49 +124,49 @@ proxychains looks for configuration in the following order:
|
|||||||
|
|
||||||
see more in */etc/proxychains.conf*
|
see more in */etc/proxychains.conf*
|
||||||
|
|
||||||
### Usage Example
|
=== Usage Example
|
||||||
|
|
||||||
```
|
----
|
||||||
$ proxychains4 telnet targethost.com
|
$ proxychains telnet targethost.com
|
||||||
```
|
----
|
||||||
|
|
||||||
in this example it will run telnet through proxy(or chained proxies)
|
in this example it will run telnet through proxy(or chained proxies)
|
||||||
specified by *proxychains.conf*
|
specified by *proxychains.conf*
|
||||||
|
|
||||||
### Usage Example
|
=== Usage Example
|
||||||
|
|
||||||
```
|
----
|
||||||
$ proxychains4 -f /etc/proxychains-other.conf targethost2.com
|
$ proxychains -f /etc/proxychains-other.conf targethost2.com
|
||||||
```
|
----
|
||||||
|
|
||||||
in this example it will use different configuration file then *proxychains.conf*
|
in this example it will use different configuration file then *proxychains.conf*
|
||||||
to connect to targethost2.com host.
|
to connect to targethost2.com host.
|
||||||
|
|
||||||
### Usage Example
|
=== Usage Example
|
||||||
|
|
||||||
```
|
----
|
||||||
$ proxyresolv targethost.com
|
$ proxyresolv targethost.com
|
||||||
```
|
----
|
||||||
|
|
||||||
in this example it will resolve targethost.com through proxy(or chained proxies)
|
in this example it will resolve targethost.com through proxy(or chained proxies)
|
||||||
specified by *proxychains.conf*
|
specified by *proxychains.conf*
|
||||||
|
|
||||||
### Usage Example:
|
=== Usage Example:
|
||||||
|
|
||||||
```
|
----
|
||||||
$ ssh -fN -D 4321 some.example.com
|
$ ssh -fN -D 4321 some.example.com
|
||||||
$ PROXYCHAINS_SOCKS5_HOST=127.0.0.1 PROXYCHAINS_SOCKS5_PORT=4321 proxychains zsh
|
$ PROXYCHAINS_SOCKS5=4321 proxychains zsh
|
||||||
```
|
----
|
||||||
|
|
||||||
in this example, it will run a shell with all traffic proxied through
|
in this example, it will run a shell with all traffic proxied through
|
||||||
OpenSSH's "dynamic proxy" (SOCKS5 proxy) on localhost port 4321.
|
OpenSSH's "dynamic proxy" (SOCKS5 proxy) on localhost port 4321.
|
||||||
|
|
||||||
### Usage Example:
|
=== Usage Example:
|
||||||
|
|
||||||
```
|
----
|
||||||
$ export PROXY_DNS_SERVER=8.8.8.8
|
$ export PROXY_DNS_SERVER=8.8.8.8
|
||||||
$ proxychains4 telnet targethost.com
|
$ proxychains telnet targethost.com
|
||||||
```
|
----
|
||||||
|
|
||||||
in this example, it will telnet to targethost.com using the 8.8.8.8
|
in this example, it will telnet to targethost.com using the 8.8.8.8
|
||||||
nameserver supplied by the user through the PROXY_DNS_SERVER
|
nameserver supplied by the user through the PROXY_DNS_SERVER
|
||||||
@@ -1,11 +1,7 @@
|
|||||||
ProxyChains ver 4.0 TODO
|
ProxyChains ver 4.0 TODO
|
||||||
===================
|
===================
|
||||||
|
|
||||||
- hooks for reentrant dns functions, i.e. gethostbyaddr_r
|
|
||||||
- shadowsocks support #133
|
hooks for reentrant dns functions, i.e. gethostbyaddr_r
|
||||||
- proxy change according to attempts #156
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
#compdef proxychains4
|
|
||||||
|
|
||||||
_arguments -s -S '1: :{_command_names -e}' '*:: :_normal'
|
|
||||||
@@ -80,7 +80,7 @@ if [ -z "$CC" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $develflg -eq 1 ]; then
|
if [ $develflg -eq 1 ]; then
|
||||||
CFLAGS="-Wextra -Wunused -Wuninitialized -Wconversion -fno-common -g -O0 -DDEBUG"
|
CFLAGS="-Wextra -Wunused -Wuninitialized -Wconversion -fno-common -g -O0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo CC?=$CC>config.mak
|
echo CC?=$CC>config.mak
|
||||||
@@ -96,11 +96,9 @@ echo includedir=$includedir>>config.mak
|
|||||||
echo sysconfdir=$sysconfdir>>config.mak
|
echo sysconfdir=$sysconfdir>>config.mak
|
||||||
|
|
||||||
if ismac ; then
|
if ismac ; then
|
||||||
arch=`uname -m`
|
|
||||||
|
|
||||||
echo LDSO_SUFFIX=dylib>>config.mak
|
echo LDSO_SUFFIX=dylib>>config.mak
|
||||||
echo OS_CFLAGS+=-DIS_MAC=1 -arch $arch >>config.mak
|
echo OS_CFLAGS+=-DIS_MAC=1 -arch x86_64 >>config.mak
|
||||||
echo OS_LDFLAGS+=-arch $arch -lpthread -ldl -Wl,>>config.mak
|
echo OS_LDFLAGS+=-arch x86_64 -lpthread -ldl -Wl,>>config.mak
|
||||||
echo LD_SET_SONAME=-Wl,-install_name,>>config.mak
|
echo LD_SET_SONAME=-Wl,-install_name,>>config.mak
|
||||||
echo LDSO_SUFFIX=dylib>>config.mak
|
echo LDSO_SUFFIX=dylib>>config.mak
|
||||||
echo INSTALL_FLAGS=-m>>config.mak
|
echo INSTALL_FLAGS=-m>>config.mak
|
||||||
|
|||||||
Vendored
-13
@@ -1,13 +0,0 @@
|
|||||||
strict_chain
|
|
||||||
#proxy_dns
|
|
||||||
#remote_dns_subnet 224
|
|
||||||
tcp_read_time_out 15000
|
|
||||||
tcp_connect_time_out 8000
|
|
||||||
|
|
||||||
localnet 127.0.0.0/255.0.0.0
|
|
||||||
|
|
||||||
|
|
||||||
[ProxyList]
|
|
||||||
http 162.243.184.252 8585
|
|
||||||
#socks4 184.170.245.148 4145
|
|
||||||
#raw 162.243.184.252 8585
|
|
||||||
+2
-2
@@ -1,13 +1,13 @@
|
|||||||
Begin3
|
Begin3
|
||||||
Title: ProxyChains
|
Title: ProxyChains
|
||||||
Version: 4.3
|
Version: 4.0
|
||||||
Entered-date:
|
Entered-date:
|
||||||
Description:
|
Description:
|
||||||
Keywords:
|
Keywords:
|
||||||
Author: <N37CR347UR3>
|
Author: <N37CR347UR3>
|
||||||
Maintained-by: <haad@netbsd.org>
|
Maintained-by: <haad@netbsd.org>
|
||||||
Primary-site:
|
Primary-site:
|
||||||
Home-page: https://github.com/haad/proxychains
|
Home-page: http://proxychains.sourceforge.net
|
||||||
Original-site:
|
Original-site:
|
||||||
Platforms: Linux and other Unices
|
Platforms: Linux and other Unices
|
||||||
Copying-policy: GNU Public License
|
Copying-policy: GNU Public License
|
||||||
|
|||||||
+1
-2
@@ -1,5 +1,4 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -49,6 +48,6 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) {
|
|||||||
return path;
|
return path;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
perror("couldn't find configuration file");
|
perror("couldnt find configuration file");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-4
@@ -528,7 +528,7 @@ unsigned int get_rand_int(unsigned int range){
|
|||||||
return (randval % range);
|
return (randval % range);
|
||||||
} else {
|
} else {
|
||||||
srand((unsigned int)time(NULL));
|
srand((unsigned int)time(NULL));
|
||||||
return ((unsigned int)rand() % range);
|
return (rand() % range);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -829,7 +829,7 @@ struct hostent *proxy_gethostbyname(const char *name, struct gethostbyname_data*
|
|||||||
|
|
||||||
MUTEX_UNLOCK(&internal_ips_lock);
|
MUTEX_UNLOCK(&internal_ips_lock);
|
||||||
|
|
||||||
strncpy(data->addr_name, name, sizeof(data->addr_name) - 1);
|
strncpy(data->addr_name, name, sizeof(data->addr_name));
|
||||||
|
|
||||||
data->hostent_space.h_name = data->addr_name;
|
data->hostent_space.h_name = data->addr_name;
|
||||||
data->hostent_space.h_length = sizeof(in_addr_t);
|
data->hostent_space.h_length = sizeof(in_addr_t);
|
||||||
@@ -906,7 +906,7 @@ int proxy_getaddrinfo(const char *node, const char *service, const struct addrin
|
|||||||
if(service)
|
if(service)
|
||||||
proxy_getservbyname(service, &se_buf, buf, sizeof(buf), &se);
|
proxy_getservbyname(service, &se_buf, buf, sizeof(buf), &se);
|
||||||
|
|
||||||
port = se ? se->s_port : htons((uint16_t)atoi(service ? service : "0"));
|
port = se ? se->s_port : htons(atoi(service ? service : "0"));
|
||||||
((struct sockaddr_in *) &space->sockaddr_space)->sin_port = (in_port_t)port;
|
((struct sockaddr_in *) &space->sockaddr_space)->sin_port = (in_port_t)port;
|
||||||
|
|
||||||
*res = p = &space->addrinfo_space;
|
*res = p = &space->addrinfo_space;
|
||||||
@@ -914,7 +914,7 @@ int proxy_getaddrinfo(const char *node, const char *service, const struct addrin
|
|||||||
|
|
||||||
p->ai_addr = &space->sockaddr_space;
|
p->ai_addr = &space->sockaddr_space;
|
||||||
if(node)
|
if(node)
|
||||||
strncpy(space->addr_name, node, sizeof(space->addr_name) - 1);
|
strncpy(space->addr_name, node, sizeof(space->addr_name));
|
||||||
p->ai_canonname = space->addr_name;
|
p->ai_canonname = space->addr_name;
|
||||||
p->ai_next = NULL;
|
p->ai_next = NULL;
|
||||||
p->ai_family = space->sockaddr_space.sa_family = AF_INET;
|
p->ai_family = space->sockaddr_space.sa_family = AF_INET;
|
||||||
|
|||||||
@@ -335,14 +335,14 @@ static void get_chain_data(proxy_data * pd, unsigned int *proxy_count, chain_typ
|
|||||||
|
|
||||||
if(dnat_orig_port[0]) {
|
if(dnat_orig_port[0]) {
|
||||||
dnats[num_dnats].orig_port =
|
dnats[num_dnats].orig_port =
|
||||||
(unsigned short) atoi(dnat_orig_port);
|
(short) atoi(dnat_orig_port);
|
||||||
} else {
|
} else {
|
||||||
dnats[num_dnats].orig_port = 0;
|
dnats[num_dnats].orig_port = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(dnat_new_port[0]) {
|
if(dnat_new_port[0]) {
|
||||||
dnats[num_dnats].new_port =
|
dnats[num_dnats].new_port =
|
||||||
(unsigned short) atoi(dnat_new_port);
|
(short) atoi(dnat_new_port);
|
||||||
} else {
|
} else {
|
||||||
dnats[num_dnats].new_port = 0;
|
dnats[num_dnats].new_port = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-14
@@ -26,14 +26,10 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
static int usage(char **argv) {
|
static int usage(char **argv) {
|
||||||
printf( "\nProxychains4: %d.%d.%d\n"
|
printf("\nUsage:\t%s -q -f config_file program_name [arguments]\n"
|
||||||
"Usage:\t%s -q -f config_file program_name [arguments]\n"
|
"\t-q makes proxychains quiet - this overrides the config setting\n"
|
||||||
"\t-v print version and exit\n"
|
"\t-f allows to manually specify a configfile to use\n"
|
||||||
"\t-q makes proxychains quiet - this overrides the config setting\n"
|
"\tfor example : proxychains telnet somehost.com\n" "More help in README file\n\n", argv[0]);
|
||||||
"\t-f allows to manually specify a configfile to use\n"
|
|
||||||
"\n\tfor example : proxychains telnet somehost.com\n"
|
|
||||||
"\n\tMore help in README file\n\n", PROXYCHAINS_VERSION_MAJOR,
|
|
||||||
PROXYCHAINS_VERSION_MINOR, PROXYCHAINS_VERSION_BUGFIX, argv[0]);
|
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,10 +77,6 @@ int main(int argc, char *argv[]) {
|
|||||||
if(argv[start_argv][1] == 'q') {
|
if(argv[start_argv][1] == 'q') {
|
||||||
quiet = 1;
|
quiet = 1;
|
||||||
start_argv++;
|
start_argv++;
|
||||||
} else if(argv[start_argv][1] == 'v') {
|
|
||||||
printf("Proxychains4 version: %d.%d.%d\n", PROXYCHAINS_VERSION_MAJOR, PROXYCHAINS_VERSION_MINOR, PROXYCHAINS_VERSION_BUGFIX);
|
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
|
|
||||||
} else if(argv[start_argv][1] == 'f') {
|
} else if(argv[start_argv][1] == 'f') {
|
||||||
|
|
||||||
if(start_argv + 1 < argc)
|
if(start_argv + 1 < argc)
|
||||||
@@ -115,7 +107,6 @@ int main(int argc, char *argv[]) {
|
|||||||
// search DLL
|
// search DLL
|
||||||
set_own_dir(argv[0]);
|
set_own_dir(argv[0]);
|
||||||
|
|
||||||
i = 0;
|
|
||||||
while(dll_dirs[i]) {
|
while(dll_dirs[i]) {
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", dll_dirs[i], dll_name);
|
snprintf(buf, sizeof(buf), "%s/%s", dll_dirs[i], dll_name);
|
||||||
if(access(buf, R_OK) != -1) {
|
if(access(buf, R_OK) != -1) {
|
||||||
@@ -126,7 +117,7 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!prefix) {
|
if(!prefix) {
|
||||||
fprintf(stderr, "couldn't locate %s\n", dll_name);
|
fprintf(stderr, "couldnt locate %s\n", dll_name);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ echo "ProxyChains-4.0 (https://github.com/haad/proxychains)"
|
|||||||
usage() {
|
usage() {
|
||||||
|
|
||||||
echo " usage:"
|
echo " usage:"
|
||||||
echo " $0 [hqv] [-f config-file] <prog> [args]"
|
echo " $0 [hq] [-f config-file] <prog> [args]"
|
||||||
echo " -q make proxychains quiet"
|
echo " -q make proxychains quiet"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user