Git Product home page Git Product logo

chameleonsocks's Introduction

What is CROPS (CROssPlatformS)?

CROPS is an open source, cross-platform development framework that leverages Docker containers to provide an easily managed, extensible environment which allows developers to build binaries for a variety of architectures of Windows, Linux and Mac OS X hosts.

CROPS components

  • CEED - runs on the development host and exposes an API to Integrated Development Environments (IDEs) or CLI callers
  • TURFF - runs in a container and services requests from CODI
  • CODI - COntainer DIspatcher runs in a container and keeps track of all available TURFF instances in its internal table. CODI also redirects CEED requests to the corresponding TURFF instance

USING CROPS FOR ZEPHYR OS DEVELOPMENT

Please refer to the GitHub Wiki

USING CROPS WITH YOUR OWN TOOLCHAIN

  1. Install Docker (Linux) or Docker Toolbox (Windows/Mac)

  2. Build CODI dependencies container

Execute the following command from within the dockerfiles directory:

docker build -t crops/codi:deps -f Dockerfile.codi.deps .
  1. Build CODI container

Execute the following command from within the dockerfiles directory:

docker build -t crops/codi:version -f Dockerfile.codi ../
  1. Build toolchain dependencies container

Execute the following command from within the dockerfiles directory:

docker build -t crops/toolchain:deps -f Dockerfile.toolchain.deps .
  1. Open the Dockerfile.toolchain file and provide the URL to your toolchain

Example:

ENV TOOLCHAIN_NAME poky-glibc-x86_64-core-image-sato-i586-toolchain-2.0.sh
ENV TOOLCHAIN_PATH http://downloads.yoctoproject.org/releases/yocto/yocto-2.0/toolchain/x86_64/
  1. Build your toolchain container
docker build -t crops/toolchain:my_toolchain -f Dockerfile.toolchain ../
  1. Start CODI container
docker run -d --name codi-test -v /var/run/docker.sock:/var/run/docker.sock --net=host crops/codi:version
  1. Start toolchain container
mkdir -p $HOME/crops-workspace && docker run -d --name crops-toolchain-my_toolchain -v $HOME/crops-workspace/:/crops/   --env TURFFID=crops-toolchain-my_toolchain --net=host crops/toolchain:my_toolchain
  1. Run the Zephyr installer and answer "Yes" when prompted to install CEED. Answer "No" to all other questions
curl -kOs https://raw.githubusercontent.com/crops/crops/master/installers/zephyr-installer.sh && source   ./zephyr-installer.sh
  1. Place your project in the shared workspace

Example:

$HOME/crops-workspace/my_project/
  1. Build your project

Example:

$HOME/.crops/ceed/ceed -d crops-toolchain-my_toolchain -g "make -C /crops/my_project/"
  1. Share your toolchain with other developers by pushing it to Docker Hub

Example:

$docker push crops/toolchain:my_toolchain"

CONTRIBUTING TO CROPS

COMPILE CEED, TURFF AND CODI ON LINUX

Required Prerequisites

  • libsqlite3-dev - "SQLite is a C library that implements an SQL database engine."
  • libcurl4-openssl-dev (7.40 or later) - "libcurl is an easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP."
  • libjansson-dev - "Jansson is a C library for encoding, decoding and manipulating JSON data."
  1. Install Prerequisites On Debian / Ubuntu
apt-get install libsqlite3-dev libcurl4-openssl-dev libjansson-dev
  1. Compile
  • GCC
CC=gcc make all
  • CLANG
CC=clang make all
  1. Debug Compile
  • GCC
CC=gcc make debug
  • CLANG
CC=clang make debug

RUNNING A CLANG STATIC ANALYSYS

  1. Run the static analyzer
scan-build -V make
  1. Point your browser at the following URL to view the static analysis results
http://127.0.0.1:8181

chameleonsocks's People

Contributors

bavery22 avatar todorez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chameleonsocks's Issues

Unable to get working with HTTP Proxy

Hello! I'm trying to get this working as part of the Yocto/Ostro build system on Ubuntu Server 16.04.1 with my company's HTTP proxy.

chameleonsocks.sh settings are as follows:

: ${PROXY:=http://gateway.zscalertwo.net}
: ${PORT:=12345}
: ${PROXY_TYPE:=http-connect}
: ${EXCEPTIONS:=/usr/local/etc/chameleonsocks.exceptions}

My exceptions file is blank (for now). I get a notification during install about how it's going to load the defaults.

Simple curl command fails:

$ curl http://www.microsoft.com -v -4
* Rebuilt URL to: http://www.microsoft.com/
*   Trying 23.73.78.60...
* connect to 23.73.78.60 port 80 failed: Connection refused
* Failed to connect to www.microsoft.com port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to www.microsoft.com port 80: Connection refused

Docker log says:

me@computer:~$ sudo docker logs chameleonsocks
sed: -e expression #1, char 24: unknown option to `s'
iptables: Chain already exists.
curl: try 'curl --help' or 'curl --manual' for more information
file parsing error at line 30: Name or service not known
file parsing error at line 30: value can't be parsed
file parsing error at line 30: unclosed section

I'm used to setting up the config file for every tool as well as the env vars but liked the idea of just setting it up in one place. Thanks for your help!

Add ipv6 support

At present only IPv4 is supported and some users (often unintentionally) have their machines configured for IPv6. As IPv6 gains more popularity, we'll have to add support for it.

chameleonsocks --upgrade does not work

When trying to upgrade from an older version of chameleonsocks, we are trying to remove the docker image which is not yet installed. Remove crops/chameleonsocks:*

how to configure http proxy with user and passsword?

Hi:
I'm trying to get this working as part of the Yocto build system on Ubuntu Server 16.04.1 with HTTP proxy.

from README file , i don't see any description how to configure proxy user and passwd, such as for genereal http_proxy which need indicate user and passwd:
export http_proxy='http://user:[email protected]:8080/'

so, i follow the previous pattern, modify like this:
: ${PROXY:=user:[email protected]}
: ${PORT:=8080}
: ${PROXY_TYPE:=http-connect}

after this configure, git command also failed,
git ls-remote https://github.com/msgpack/msgpack-c.git
fatal: unable to access 'https://github.com/msgpack/msgpack-c.git/': Failed to connect to github.com port 443: Connection refused

please give me some advice ,thanks alot

Strip protocol prefix from PROXY url

If the user provides a protocol when specifying the PROXY url, redosocks complains that the redsocks.conf is invalid. We need to validate that the PROXY includes only the domain name or IP address of the proxy server.

Slow PAC server response issue

If the PAC server does not respond within a couple of seconds the exception subnets are not added to the iptable rules.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.